@stigg/typescript-mcp 0.1.0-beta.1 → 0.1.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth.d.mts.map +1 -1
- package/auth.d.ts.map +1 -1
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +25 -12
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +25 -12
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +2 -2
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +2 -2
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.mjs.map +1 -1
- package/index.mjs.map +1 -1
- package/instructions.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +807 -196
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +807 -196
- package/local-docs-search.mjs.map +1 -1
- package/logger.d.mts.map +1 -1
- package/logger.d.ts.map +1 -1
- package/logger.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +102 -24
- package/methods.js.map +1 -1
- package/methods.mjs +102 -24
- package/methods.mjs.map +1 -1
- package/options.mjs.map +1 -1
- package/package.json +2 -2
- package/server.d.mts.map +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +1 -1
- package/server.js.map +1 -1
- package/server.mjs +1 -1
- package/server.mjs.map +1 -1
- package/src/code-tool-worker.ts +25 -12
- package/src/local-docs-search.ts +931 -199
- package/src/methods.ts +102 -24
- package/src/server.ts +1 -1
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.mjs.map +1 -1
- package/types.d.mts.map +1 -1
- package/types.d.ts.map +1 -1
package/local-docs-search.js
CHANGED
|
@@ -1144,7 +1144,7 @@ const EMBEDDED_METHODS = [
|
|
|
1144
1144
|
'unitQuantity?: number;',
|
|
1145
1145
|
],
|
|
1146
1146
|
response: "{ data: { id: string; entitlements: object | object[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: object; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }",
|
|
1147
|
-
markdown: "## provision\n\n`client.v1.subscriptions.provision(customerId: string, planId: string, id?: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingId?: string, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, 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```",
|
|
1147
|
+
markdown: "## provision\n\n`client.v1.subscriptions.provision(customerId: string, planId: string, id?: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, awaitPaymentConfirmation?: boolean, billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingId?: string, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', budget?: { hasSoftLimit: boolean; limit: number; }, 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 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```",
|
|
1148
1148
|
perLanguage: {
|
|
1149
1149
|
typescript: {
|
|
1150
1150
|
method: 'client.v1.subscriptions.provision',
|
|
@@ -1341,7 +1341,7 @@ const EMBEDDED_METHODS = [
|
|
|
1341
1341
|
'unitQuantity?: number;',
|
|
1342
1342
|
],
|
|
1343
1343
|
response: '{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }',
|
|
1344
|
-
markdown: "## preview\n\n`client.v1.subscriptions.preview(customerId: string, planId: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, billableFeatures?: { featureId: string; quantity: number; }[], billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], payingCustomerId?: string, resourceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions/preview`\n\nPreviews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details.\n\n### Parameters\n\n- `customerId: string`\n Customer ID\n\n- `planId: string`\n Plan ID\n\n- `addons?: { id: string; quantity: number; }[]`\n Addons to include\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon or discount to apply\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `billableFeatures?: { featureId: string; quantity: number; }[]`\n Billable features with quantities\n\n- `billingCountryCode?: string`\n ISO 3166-1 country code for localization\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n Billing and tax configuration\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address\n - `chargeOnBehalfOfAccount?: string`\n Connected account ID for platform billing\n - `integrationId?: string`\n Billing integration ID\n - `invoiceDaysUntilDue?: number`\n Days until invoice is due\n - `isBackdated?: boolean`\n Whether subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether invoice is already paid\n - `metadata?: object`\n Additional billing metadata\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n Proration behavior\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax IDs\n - `taxPercentage?: number`\n Tax percentage to apply\n - `taxRateIds?: string[]`\n Tax rate IDs from billing provider\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n One-time or recurring charges\n\n- `payingCustomerId?: string`\n Paying customer ID for delegated billing\n\n- `resourceId?: string`\n Resource ID for multi-instance subscriptions\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n When to apply subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether to start as trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends\n - `trialEndDate?: string`\n Trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing
|
|
1344
|
+
markdown: "## preview\n\n`client.v1.subscriptions.preview(customerId: string, planId: string, addons?: { id: string; quantity: number; }[], appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: object[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }, billableFeatures?: { featureId: string; quantity: number; }[], billingCountryCode?: string, billingCycleAnchor?: 'UNCHANGED' | 'NOW', billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }, billingPeriod?: 'MONTHLY' | 'ANNUALLY', charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[], payingCustomerId?: string, resourceId?: string, scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE', startDate?: string, trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }, unitQuantity?: number): { data: object; }`\n\n**post** `/api/v1/subscriptions/preview`\n\nPreviews the pricing impact of creating or updating a subscription without making changes. Returns estimated costs, taxes, and proration details.\n\n### Parameters\n\n- `customerId: string`\n Customer ID\n\n- `planId: string`\n Plan ID\n\n- `addons?: { id: string; quantity: number; }[]`\n Addons to include\n\n- `appliedCoupon?: { billingCouponId?: string; configuration?: { startDate?: string; }; couponId?: string; discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }; promotionCode?: string; }`\n Coupon or discount to apply\n - `billingCouponId?: string`\n Billing provider coupon ID\n - `configuration?: { startDate?: string; }`\n Coupon timing configuration\n - `couponId?: string`\n Stigg coupon ID\n - `discount?: { amountsOff?: { amount: number; currency: string; }[]; description?: string; durationInMonths?: number; name?: string; percentOff?: number; }`\n Ad-hoc discount configuration\n - `promotionCode?: string`\n Promotion code to apply\n\n- `billableFeatures?: { featureId: string; quantity: number; }[]`\n Billable features with quantities\n\n- `billingCountryCode?: string`\n ISO 3166-1 country code for localization\n\n- `billingCycleAnchor?: 'UNCHANGED' | 'NOW'`\n Billing cycle anchor behavior for the subscription\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; chargeOnBehalfOfAccount?: string; integrationId?: string; invoiceDaysUntilDue?: number; isBackdated?: boolean; isInvoicePaid?: boolean; metadata?: object; prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'; taxIds?: { type: string; value: string; }[]; taxPercentage?: number; taxRateIds?: string[]; }`\n Billing and tax configuration\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n Billing address\n - `chargeOnBehalfOfAccount?: string`\n Connected account ID for platform billing\n - `integrationId?: string`\n Billing integration ID\n - `invoiceDaysUntilDue?: number`\n Days until invoice is due\n - `isBackdated?: boolean`\n Whether subscription is backdated\n - `isInvoicePaid?: boolean`\n Whether invoice is already paid\n - `metadata?: object`\n Additional billing metadata\n - `prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE'`\n Proration behavior\n - `taxIds?: { type: string; value: string; }[]`\n Customer tax IDs\n - `taxPercentage?: number`\n Tax percentage to apply\n - `taxRateIds?: string[]`\n Tax rate IDs from billing provider\n\n- `billingPeriod?: 'MONTHLY' | 'ANNUALLY'`\n Billing period (MONTHLY or ANNUALLY)\n\n- `charges?: { id: string; quantity: number; type: 'FEATURE' | 'CREDIT'; }[]`\n One-time or recurring charges\n\n- `payingCustomerId?: string`\n Paying customer ID for delegated billing\n\n- `resourceId?: string`\n Resource ID for multi-instance subscriptions\n\n- `scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE'`\n When to apply subscription changes\n\n- `startDate?: string`\n Subscription start date\n\n- `trialOverrideConfiguration?: { isTrial: boolean; trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'; trialEndDate?: string; }`\n Trial period override settings\n - `isTrial: boolean`\n Whether to start as trial\n - `trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION'`\n Behavior when trial ends\n - `trialEndDate?: string`\n Trial end date\n\n- `unitQuantity?: number`\n Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).\n\n### Returns\n\n- `{ data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: object; currency?: string; discount?: number; discountDetails?: object; discounts?: object[]; lines?: object[]; tax?: number; }; }; }`\n Response object\n\n - `data: { immediateInvoice: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; billingPeriodRange?: { end?: string; start?: string; }; freeItems?: { id: string; quantity: number; }[]; hasScheduledUpdates?: boolean; isPlanDowngrade?: boolean; recurringInvoice?: { subTotal: number; total: number; billingPeriodRange?: { end: string; start: string; }; currency?: string; discount?: number; discountDetails?: { code?: string; fixedAmount?: number; percentage?: number; }; discounts?: { amount: number; currency: string; description: string; }[]; lines?: { currency: string; description: string; subTotal: number; unitPrice: number; quantity?: number; }[]; tax?: number; }; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.subscriptions.preview({ customerId: 'customerId', planId: 'planId' });\n\nconsole.log(response);\n```",
|
|
1345
1345
|
perLanguage: {
|
|
1346
1346
|
typescript: {
|
|
1347
1347
|
method: 'client.v1.subscriptions.preview',
|
|
@@ -1479,7 +1479,7 @@ const EMBEDDED_METHODS = [
|
|
|
1479
1479
|
},
|
|
1480
1480
|
csharp: {
|
|
1481
1481
|
method: 'V1.Subscriptions.Import',
|
|
1482
|
-
example: 'SubscriptionImportParams parameters = new()\n{\n Subscriptions =\n [\n new()\n {\n ID = "id",\n CustomerID = "customerId",\n PlanID = "planId",\n Addons =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n },\n ],\n BillingID = "billingId",\n BillingPeriod = BillingPeriod.Monthly,\n Charges =\n [\n new()\n {\n ID = "id",\n Quantity =
|
|
1482
|
+
example: 'SubscriptionImportParams parameters = new()\n{\n Subscriptions =\n [\n new()\n {\n ID = "id",\n CustomerID = "customerId",\n PlanID = "planId",\n Addons =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n },\n ],\n BillingID = "billingId",\n BillingPeriod = BillingPeriod.Monthly,\n Charges =\n [\n new()\n {\n ID = "id",\n Quantity = 0,\n Type = Type.Feature,\n },\n ],\n EndDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n Metadata = new Dictionary<string, string>() { { "foo", "string" } },\n ResourceID = "resourceId",\n StartDate = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),\n },\n ],\n};\n\nvar response = await client.V1.Subscriptions.Import(parameters);\n\nConsole.WriteLine(response);',
|
|
1483
1483
|
},
|
|
1484
1484
|
http: {
|
|
1485
1485
|
example: 'curl https://api.stigg.io/api/v1/subscriptions/import \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "subscriptions": [\n {\n "id": "id",\n "customerId": "customerId",\n "planId": "planId"\n }\n ]\n }\'',
|
|
@@ -2056,46 +2056,47 @@ const EMBEDDED_METHODS = [
|
|
|
2056
2056
|
httpMethod: 'get',
|
|
2057
2057
|
summary: 'Get credit usage',
|
|
2058
2058
|
description: 'Retrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.',
|
|
2059
|
-
stainlessPath: '(resource) v1.
|
|
2060
|
-
qualified: 'client.v1.
|
|
2059
|
+
stainlessPath: '(resource) v1.credits > (method) get_usage',
|
|
2060
|
+
qualified: 'client.v1.credits.getUsage',
|
|
2061
2061
|
params: [
|
|
2062
2062
|
'customerId: string;',
|
|
2063
2063
|
'currencyId?: string;',
|
|
2064
2064
|
'endDate?: string;',
|
|
2065
|
+
'groupBy?: string;',
|
|
2065
2066
|
'resourceId?: string;',
|
|
2066
2067
|
'startDate?: string;',
|
|
2067
2068
|
"timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';",
|
|
2068
2069
|
],
|
|
2069
|
-
response: '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }',
|
|
2070
|
-
markdown: "## get_usage\n\n`client.v1.
|
|
2070
|
+
response: '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; tags?: object[]; }[]; }; }',
|
|
2071
|
+
markdown: "## get_usage\n\n`client.v1.credits.getUsage(customerId: string, currencyId?: string, endDate?: string, groupBy?: 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- `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- `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; tags?: object[]; }[]; }; }`\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; 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```",
|
|
2071
2072
|
perLanguage: {
|
|
2072
2073
|
typescript: {
|
|
2073
|
-
method: 'client.v1.
|
|
2074
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2074
|
+
method: 'client.v1.credits.getUsage',
|
|
2075
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response.data);",
|
|
2075
2076
|
},
|
|
2076
2077
|
python: {
|
|
2077
|
-
method: 'v1.
|
|
2078
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.
|
|
2078
|
+
method: 'v1.credits.get_usage',
|
|
2079
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.get_usage(\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2079
2080
|
},
|
|
2080
2081
|
java: {
|
|
2081
|
-
method: 'v1().
|
|
2082
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2082
|
+
method: 'v1().credits().getUsage',
|
|
2083
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditGetUsageParams;\nimport io.stigg.models.v1.credits.CreditGetUsageResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGetUsageParams params = CreditGetUsageParams.builder()\n .customerId("customerId")\n .build();\n CreditGetUsageResponse response = client.v1().credits().getUsage(params);\n }\n}',
|
|
2083
2084
|
},
|
|
2084
2085
|
go: {
|
|
2085
|
-
method: 'client.V1.
|
|
2086
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.
|
|
2086
|
+
method: 'client.V1.Credits.GetUsage',
|
|
2087
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.GetUsage(context.TODO(), stigg.V1CreditGetUsageParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2087
2088
|
},
|
|
2088
2089
|
ruby: {
|
|
2089
|
-
method: 'v1.
|
|
2090
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2090
|
+
method: 'v1.credits.get_usage',
|
|
2091
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.get_usage(customer_id: "customerId")\n\nputs(response)',
|
|
2091
2092
|
},
|
|
2092
2093
|
cli: {
|
|
2093
2094
|
method: 'credits get_usage',
|
|
2094
|
-
example: "stigg v1:
|
|
2095
|
+
example: "stigg v1:credits get-usage \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2095
2096
|
},
|
|
2096
2097
|
csharp: {
|
|
2097
|
-
method: 'V1.
|
|
2098
|
-
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.
|
|
2098
|
+
method: 'V1.Credits.GetUsage',
|
|
2099
|
+
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
2099
2100
|
},
|
|
2100
2101
|
http: {
|
|
2101
2102
|
example: 'curl https://api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2108,39 +2109,39 @@ const EMBEDDED_METHODS = [
|
|
|
2108
2109
|
httpMethod: 'get',
|
|
2109
2110
|
summary: 'Get automatic recharge configuration',
|
|
2110
2111
|
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2111
|
-
stainlessPath: '(resource) v1.
|
|
2112
|
-
qualified: 'client.v1.
|
|
2112
|
+
stainlessPath: '(resource) v1.credits > (method) get_auto_recharge',
|
|
2113
|
+
qualified: 'client.v1.credits.getAutoRecharge',
|
|
2113
2114
|
params: ['currencyId: string;', 'customerId: string;'],
|
|
2114
2115
|
response: "{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }",
|
|
2115
|
-
markdown: "## get_auto_recharge\n\n`client.v1.
|
|
2116
|
+
markdown: "## get_auto_recharge\n\n`client.v1.credits.getAutoRecharge(currencyId: string, customerId: string): { data: object; }`\n\n**get** `/api/v1/credits/auto-recharge`\n\nRetrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.\n\n### Parameters\n\n- `currencyId: string`\n Filter by currency ID (required)\n\n- `customerId: string`\n Filter by customer ID (required)\n\n### Returns\n\n- `{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getAutoRecharge({ currencyId: 'currencyId', customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2116
2117
|
perLanguage: {
|
|
2117
2118
|
typescript: {
|
|
2118
|
-
method: 'client.v1.
|
|
2119
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2119
|
+
method: 'client.v1.credits.getAutoRecharge',
|
|
2120
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.getAutoRecharge({\n currencyId: 'currencyId',\n customerId: 'customerId',\n});\n\nconsole.log(response.data);",
|
|
2120
2121
|
},
|
|
2121
2122
|
python: {
|
|
2122
|
-
method: 'v1.
|
|
2123
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.
|
|
2123
|
+
method: 'v1.credits.get_auto_recharge',
|
|
2124
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.get_auto_recharge(\n currency_id="currencyId",\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2124
2125
|
},
|
|
2125
2126
|
java: {
|
|
2126
|
-
method: 'v1().
|
|
2127
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2127
|
+
method: 'v1().credits().getAutoRecharge',
|
|
2128
|
+
example: '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}',
|
|
2128
2129
|
},
|
|
2129
2130
|
go: {
|
|
2130
|
-
method: 'client.V1.
|
|
2131
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.
|
|
2131
|
+
method: 'client.V1.Credits.GetAutoRecharge',
|
|
2132
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.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',
|
|
2132
2133
|
},
|
|
2133
2134
|
ruby: {
|
|
2134
|
-
method: 'v1.
|
|
2135
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2135
|
+
method: 'v1.credits.get_auto_recharge',
|
|
2136
|
+
example: '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)',
|
|
2136
2137
|
},
|
|
2137
2138
|
cli: {
|
|
2138
2139
|
method: 'credits get_auto_recharge',
|
|
2139
|
-
example: "stigg v1:
|
|
2140
|
+
example: "stigg v1:credits get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
|
|
2140
2141
|
},
|
|
2141
2142
|
csharp: {
|
|
2142
|
-
method: 'V1.
|
|
2143
|
-
example: 'CreditGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.
|
|
2143
|
+
method: 'V1.Credits.GetAutoRecharge',
|
|
2144
|
+
example: 'CreditGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.Credits.GetAutoRecharge(parameters);\n\nConsole.WriteLine(response);',
|
|
2144
2145
|
},
|
|
2145
2146
|
http: {
|
|
2146
2147
|
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2153,8 +2154,8 @@ const EMBEDDED_METHODS = [
|
|
|
2153
2154
|
httpMethod: 'get',
|
|
2154
2155
|
summary: 'Get a list of credit ledger events',
|
|
2155
2156
|
description: 'Retrieves a paginated list of credit ledger events for a customer.',
|
|
2156
|
-
stainlessPath: '(resource) v1.
|
|
2157
|
-
qualified: 'client.v1.
|
|
2157
|
+
stainlessPath: '(resource) v1.credits > (method) list_ledger',
|
|
2158
|
+
qualified: 'client.v1.credits.listLedger',
|
|
2158
2159
|
params: [
|
|
2159
2160
|
'customerId: string;',
|
|
2160
2161
|
'after?: string;',
|
|
@@ -2164,35 +2165,35 @@ const EMBEDDED_METHODS = [
|
|
|
2164
2165
|
'resourceId?: string;',
|
|
2165
2166
|
],
|
|
2166
2167
|
response: '{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }',
|
|
2167
|
-
markdown: "## list_ledger\n\n`client.v1.
|
|
2168
|
+
markdown: "## list_ledger\n\n`client.v1.credits.listLedger(customerId: string, after?: string, before?: string, currencyId?: string, limit?: number, resourceId?: string): { amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n\n**get** `/api/v1/credits/ledger`\n\nRetrieves a paginated list of credit ledger events for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n### Returns\n\n- `{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n A credit ledger event representing a change to credit balance\n\n - `amount: number`\n - `creditCurrencyId: string`\n - `creditGrantId: string`\n - `customerId: string`\n - `eventId: string`\n - `eventType: string`\n - `featureId: string`\n - `resourceId: string`\n - `timestamp: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({ customerId: 'customerId' })) {\n console.log(creditListLedgerResponse);\n}\n```",
|
|
2168
2169
|
perLanguage: {
|
|
2169
2170
|
typescript: {
|
|
2170
|
-
method: 'client.v1.
|
|
2171
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.
|
|
2171
|
+
method: 'client.v1.credits.listLedger',
|
|
2172
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({\n customerId: 'customerId',\n})) {\n console.log(creditListLedgerResponse.amount);\n}",
|
|
2172
2173
|
},
|
|
2173
2174
|
python: {
|
|
2174
|
-
method: 'v1.
|
|
2175
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.
|
|
2175
|
+
method: 'v1.credits.list_ledger',
|
|
2176
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.credits.list_ledger(\n customer_id="customerId",\n)\npage = page.data[0]\nprint(page.amount)',
|
|
2176
2177
|
},
|
|
2177
2178
|
java: {
|
|
2178
|
-
method: 'v1().
|
|
2179
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2179
|
+
method: 'v1().credits().listLedger',
|
|
2180
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditListLedgerPage;\nimport io.stigg.models.v1.credits.CreditListLedgerParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditListLedgerParams params = CreditListLedgerParams.builder()\n .customerId("customerId")\n .build();\n CreditListLedgerPage page = client.v1().credits().listLedger(params);\n }\n}',
|
|
2180
2181
|
},
|
|
2181
2182
|
go: {
|
|
2182
|
-
method: 'client.V1.
|
|
2183
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.
|
|
2183
|
+
method: 'client.V1.Credits.ListLedger',
|
|
2184
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Credits.ListLedger(context.TODO(), stigg.V1CreditListLedgerParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2184
2185
|
},
|
|
2185
2186
|
ruby: {
|
|
2186
|
-
method: 'v1.
|
|
2187
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2187
|
+
method: 'v1.credits.list_ledger',
|
|
2188
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.list_ledger(customer_id: "customerId")\n\nputs(page)',
|
|
2188
2189
|
},
|
|
2189
2190
|
cli: {
|
|
2190
2191
|
method: 'credits list_ledger',
|
|
2191
|
-
example: "stigg v1:
|
|
2192
|
+
example: "stigg v1:credits list-ledger \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2192
2193
|
},
|
|
2193
2194
|
csharp: {
|
|
2194
|
-
method: 'V1.
|
|
2195
|
-
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2195
|
+
method: 'V1.Credits.ListLedger',
|
|
2196
|
+
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.ListLedger(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2196
2197
|
},
|
|
2197
2198
|
http: {
|
|
2198
2199
|
example: 'curl https://api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2205,8 +2206,8 @@ const EMBEDDED_METHODS = [
|
|
|
2205
2206
|
httpMethod: 'get',
|
|
2206
2207
|
summary: 'Get a list of credit grants',
|
|
2207
2208
|
description: 'Retrieves a paginated list of credit grants for a customer.',
|
|
2208
|
-
stainlessPath: '(resource) v1.
|
|
2209
|
-
qualified: 'client.v1.
|
|
2209
|
+
stainlessPath: '(resource) v1.credits.grants > (method) list',
|
|
2210
|
+
qualified: 'client.v1.credits.grants.list',
|
|
2210
2211
|
params: [
|
|
2211
2212
|
'customerId: string;',
|
|
2212
2213
|
'after?: string;',
|
|
@@ -2217,35 +2218,35 @@ const EMBEDDED_METHODS = [
|
|
|
2217
2218
|
'resourceId?: string;',
|
|
2218
2219
|
],
|
|
2219
2220
|
response: "{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }",
|
|
2220
|
-
markdown: "## list\n\n`client.v1.
|
|
2221
|
+
markdown: "## list\n\n`client.v1.credits.grants.list(customerId: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, currencyId?: string, limit?: number, resourceId?: string): { id: string; amount: number; comment: string; consumedAmount: number; cost: object; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: object; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n**get** `/api/v1/credits/grants`\n\nRetrieves a paginated list of credit grants for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID. When omitted, only grants without a resource are returned\n\n### Returns\n\n- `{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n Credit grant object representing allocated credits for a customer\n\n - `id: string`\n - `amount: number`\n - `comment: string`\n - `consumedAmount: number`\n - `cost: { amount: number; currency: string; }`\n - `createdAt: string`\n - `currencyId: string`\n - `customerId: string`\n - `displayName: string`\n - `effectiveAt: string`\n - `expireAt: string`\n - `grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'`\n - `invoiceId: string`\n - `latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }`\n - `metadata: object`\n - `paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'`\n - `priority: number`\n - `resourceId: string`\n - `sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'`\n - `status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'`\n - `updatedAt: string`\n - `voidedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse);\n}\n```",
|
|
2221
2222
|
perLanguage: {
|
|
2222
2223
|
typescript: {
|
|
2223
|
-
method: 'client.v1.
|
|
2224
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.
|
|
2224
|
+
method: 'client.v1.credits.grants.list',
|
|
2225
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse.id);\n}",
|
|
2225
2226
|
},
|
|
2226
2227
|
python: {
|
|
2227
|
-
method: 'v1.
|
|
2228
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.
|
|
2228
|
+
method: 'v1.credits.grants.list',
|
|
2229
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.credits.grants.list(\n customer_id="customerId",\n)\npage = page.data[0]\nprint(page.id)',
|
|
2229
2230
|
},
|
|
2230
2231
|
java: {
|
|
2231
|
-
method: 'v1().
|
|
2232
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2232
|
+
method: 'v1().credits().grants().list',
|
|
2233
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.GrantListPage;\nimport io.stigg.models.v1.credits.grants.GrantListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n GrantListParams params = GrantListParams.builder()\n .customerId("customerId")\n .build();\n GrantListPage page = client.v1().credits().grants().list(params);\n }\n}',
|
|
2233
2234
|
},
|
|
2234
2235
|
go: {
|
|
2235
|
-
method: 'client.V1.
|
|
2236
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.
|
|
2236
|
+
method: 'client.V1.Credits.Grants.List',
|
|
2237
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Credits.Grants.List(context.TODO(), stigg.V1CreditGrantListParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2237
2238
|
},
|
|
2238
2239
|
ruby: {
|
|
2239
|
-
method: 'v1.
|
|
2240
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2240
|
+
method: 'v1.credits.grants.list',
|
|
2241
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.grants.list(customer_id: "customerId")\n\nputs(page)',
|
|
2241
2242
|
},
|
|
2242
2243
|
cli: {
|
|
2243
2244
|
method: 'grants list',
|
|
2244
|
-
example: "stigg v1:
|
|
2245
|
+
example: "stigg v1:credits:grants list \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2245
2246
|
},
|
|
2246
2247
|
csharp: {
|
|
2247
|
-
method: 'V1.
|
|
2248
|
-
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2248
|
+
method: 'V1.Credits.Grants.List',
|
|
2249
|
+
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.Grants.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2249
2250
|
},
|
|
2250
2251
|
http: {
|
|
2251
2252
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2258,8 +2259,8 @@ const EMBEDDED_METHODS = [
|
|
|
2258
2259
|
httpMethod: 'post',
|
|
2259
2260
|
summary: 'Create a credit grant',
|
|
2260
2261
|
description: 'Creates a new credit grant for a customer with specified amount, type, and optional billing configuration.',
|
|
2261
|
-
stainlessPath: '(resource) v1.
|
|
2262
|
-
qualified: 'client.v1.
|
|
2262
|
+
stainlessPath: '(resource) v1.credits.grants > (method) create',
|
|
2263
|
+
qualified: 'client.v1.credits.grants.create',
|
|
2263
2264
|
params: [
|
|
2264
2265
|
'amount: number;',
|
|
2265
2266
|
'currencyId: string;',
|
|
@@ -2278,35 +2279,35 @@ const EMBEDDED_METHODS = [
|
|
|
2278
2279
|
'resourceId?: string;',
|
|
2279
2280
|
],
|
|
2280
2281
|
response: "{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }",
|
|
2281
|
-
markdown: "## create\n\n`client.v1.
|
|
2282
|
+
markdown: "## create\n\n`client.v1.credits.grants.create(amount: number, currencyId: string, customerId: string, displayName: string, grantType: 'PAID' | 'PROMOTIONAL', awaitPaymentConfirmation?: boolean, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }, comment?: string, cost?: { amount: number; currency: string; }, effectiveAt?: string, expireAt?: string, metadata?: object, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priority?: number, resourceId?: string): { data: object; }`\n\n**post** `/api/v1/credits/grants`\n\nCreates a new credit grant for a customer with specified amount, type, and optional billing configuration.\n\n### Parameters\n\n- `amount: number`\n The credit amount to grant\n\n- `currencyId: string`\n The credit currency ID (required)\n\n- `customerId: string`\n The customer ID to grant credits to (required)\n\n- `displayName: string`\n The display name for the credit grant\n\n- `grantType: 'PAID' | 'PROMOTIONAL'`\n The type of credit grant (PAID, PROMOTIONAL)\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning (default: true)\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }`\n Billing information for the credit grant\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n The billing address\n - `invoiceDaysUntilDue?: number`\n Days until the invoice is due\n - `isInvoicePaid?: boolean`\n Whether the invoice is already paid\n\n- `comment?: string`\n An optional comment on the credit grant\n\n- `cost?: { amount: number; currency: string; }`\n The monetary cost of the credit grant\n - `amount: number`\n The price amount\n - `currency: string`\n ISO 4217 currency code\n\n- `effectiveAt?: string`\n The date when the credit grant becomes effective\n\n- `expireAt?: string`\n The date when the credit grant expires\n\n- `metadata?: object`\n Additional metadata for the credit grant\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n The payment collection method (CHARGE, INVOICE, NONE)\n\n- `priority?: number`\n The priority of the credit grant (lower number = higher priority)\n\n- `resourceId?: string`\n The resource ID to scope the grant to\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.create({\n amount: 0,\n currencyId: 'currencyId',\n customerId: 'customerId',\n displayName: 'displayName',\n grantType: 'PAID',\n});\n\nconsole.log(creditGrantResponse);\n```",
|
|
2282
2283
|
perLanguage: {
|
|
2283
2284
|
typescript: {
|
|
2284
|
-
method: 'client.v1.
|
|
2285
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.
|
|
2285
|
+
method: 'client.v1.credits.grants.create',
|
|
2286
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.credits.grants.create({\n amount: 0,\n currencyId: 'currencyId',\n customerId: 'customerId',\n displayName: 'displayName',\n grantType: 'PAID',\n});\n\nconsole.log(creditGrantResponse.data);",
|
|
2286
2287
|
},
|
|
2287
2288
|
python: {
|
|
2288
|
-
method: 'v1.
|
|
2289
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.
|
|
2289
|
+
method: 'v1.credits.grants.create',
|
|
2290
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.credits.grants.create(\n amount=0,\n currency_id="currencyId",\n customer_id="customerId",\n display_name="displayName",\n grant_type="PAID",\n)\nprint(credit_grant_response.data)',
|
|
2290
2291
|
},
|
|
2291
2292
|
java: {
|
|
2292
|
-
method: 'v1().
|
|
2293
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2293
|
+
method: 'v1().credits().grants().create',
|
|
2294
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.CreditGrantResponse;\nimport io.stigg.models.v1.credits.grants.GrantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n GrantCreateParams params = GrantCreateParams.builder()\n .amount(0.0)\n .currencyId("currencyId")\n .customerId("customerId")\n .displayName("displayName")\n .grantType(GrantCreateParams.GrantType.PAID)\n .build();\n CreditGrantResponse creditGrantResponse = client.v1().credits().grants().create(params);\n }\n}',
|
|
2294
2295
|
},
|
|
2295
2296
|
go: {
|
|
2296
|
-
method: 'client.V1.
|
|
2297
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.
|
|
2297
|
+
method: 'client.V1.Credits.Grants.New',
|
|
2298
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.Credits.Grants.New(context.TODO(), stigg.V1CreditGrantNewParams{\n\t\tAmount: 0,\n\t\tCurrencyID: "currencyId",\n\t\tCustomerID: "customerId",\n\t\tDisplayName: "displayName",\n\t\tGrantType: stigg.V1CreditGrantNewParamsGrantTypePaid,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2298
2299
|
},
|
|
2299
2300
|
ruby: {
|
|
2300
|
-
method: 'v1.
|
|
2301
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2301
|
+
method: 'v1.credits.grants.create',
|
|
2302
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.credits.grants.create(\n amount: 0,\n currency_id: "currencyId",\n customer_id: "customerId",\n display_name: "displayName",\n grant_type: :PAID\n)\n\nputs(credit_grant_response)',
|
|
2302
2303
|
},
|
|
2303
2304
|
cli: {
|
|
2304
2305
|
method: 'grants create',
|
|
2305
|
-
example: "stigg v1:
|
|
2306
|
+
example: "stigg v1:credits:grants create \\\n --api-key 'My API Key' \\\n --amount 0 \\\n --currency-id currencyId \\\n --customer-id customerId \\\n --display-name displayName \\\n --grant-type PAID",
|
|
2306
2307
|
},
|
|
2307
2308
|
csharp: {
|
|
2308
|
-
method: 'V1.
|
|
2309
|
-
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.
|
|
2309
|
+
method: 'V1.Credits.Grants.Create',
|
|
2310
|
+
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Create(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2310
2311
|
},
|
|
2311
2312
|
http: {
|
|
2312
2313
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
@@ -2319,39 +2320,39 @@ const EMBEDDED_METHODS = [
|
|
|
2319
2320
|
httpMethod: 'post',
|
|
2320
2321
|
summary: 'Void credit grant',
|
|
2321
2322
|
description: 'Voids an existing credit grant, preventing further consumption of the remaining credits.',
|
|
2322
|
-
stainlessPath: '(resource) v1.
|
|
2323
|
-
qualified: 'client.v1.
|
|
2323
|
+
stainlessPath: '(resource) v1.credits.grants > (method) void',
|
|
2324
|
+
qualified: 'client.v1.credits.grants.void',
|
|
2324
2325
|
params: ['id: string;'],
|
|
2325
2326
|
response: "{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }",
|
|
2326
|
-
markdown: "## void\n\n`client.v1.
|
|
2327
|
+
markdown: "## void\n\n`client.v1.credits.grants.void(id: string): { data: object; }`\n\n**post** `/api/v1/credits/grants/{id}/void`\n\nVoids an existing credit grant, preventing further consumption of the remaining credits.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse);\n```",
|
|
2327
2328
|
perLanguage: {
|
|
2328
2329
|
typescript: {
|
|
2329
|
-
method: 'client.v1.
|
|
2330
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.
|
|
2330
|
+
method: 'client.v1.credits.grants.void',
|
|
2331
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse.data);",
|
|
2331
2332
|
},
|
|
2332
2333
|
python: {
|
|
2333
|
-
method: 'v1.
|
|
2334
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.
|
|
2334
|
+
method: 'v1.credits.grants.void',
|
|
2335
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.credits.grants.void(\n "x",\n)\nprint(credit_grant_response.data)',
|
|
2335
2336
|
},
|
|
2336
2337
|
java: {
|
|
2337
|
-
method: 'v1().
|
|
2338
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2338
|
+
method: 'v1().credits().grants().void_',
|
|
2339
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.CreditGrantResponse;\nimport io.stigg.models.v1.credits.grants.GrantVoidParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGrantResponse creditGrantResponse = client.v1().credits().grants().void_("x");\n }\n}',
|
|
2339
2340
|
},
|
|
2340
2341
|
go: {
|
|
2341
|
-
method: 'client.V1.
|
|
2342
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.
|
|
2342
|
+
method: 'client.V1.Credits.Grants.Void',
|
|
2343
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.Credits.Grants.Void(context.TODO(), "x")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2343
2344
|
},
|
|
2344
2345
|
ruby: {
|
|
2345
|
-
method: 'v1.
|
|
2346
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2346
|
+
method: 'v1.credits.grants.void',
|
|
2347
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.credits.grants.void("x")\n\nputs(credit_grant_response)',
|
|
2347
2348
|
},
|
|
2348
2349
|
cli: {
|
|
2349
2350
|
method: 'grants void',
|
|
2350
|
-
example: "stigg v1:
|
|
2351
|
+
example: "stigg v1:credits:grants void \\\n --api-key 'My API Key' \\\n --id x",
|
|
2351
2352
|
},
|
|
2352
2353
|
csharp: {
|
|
2353
|
-
method: 'V1.
|
|
2354
|
-
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.
|
|
2354
|
+
method: 'V1.Credits.Grants.Void',
|
|
2355
|
+
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Void(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2355
2356
|
},
|
|
2356
2357
|
http: {
|
|
2357
2358
|
example: 'curl https://api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2364,39 +2365,39 @@ const EMBEDDED_METHODS = [
|
|
|
2364
2365
|
httpMethod: 'get',
|
|
2365
2366
|
summary: 'Get a list of custom currencys',
|
|
2366
2367
|
description: 'Retrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.',
|
|
2367
|
-
stainlessPath: '(resource) v1.
|
|
2368
|
-
qualified: 'client.v1.
|
|
2368
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list',
|
|
2369
|
+
qualified: 'client.v1.credits.customCurrencies.list',
|
|
2369
2370
|
params: ['after?: string;', 'before?: string;', 'limit?: number;', "status?: 'ACTIVE' | 'ARCHIVED'[];"],
|
|
2370
2371
|
response: '{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }',
|
|
2371
|
-
markdown: "## list\n\n`client.v1.
|
|
2372
|
+
markdown: "## list\n\n`client.v1.credits.customCurrencies.list(after?: string, before?: string, limit?: number, status?: 'ACTIVE' | 'ARCHIVED'[]): { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: object; updatedAt: string; }`\n\n**get** `/api/v1/credits/custom-currencies`\n\nRetrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'ACTIVE' | 'ARCHIVED'[]`\n Filter by custom currency status. Supports comma-separated values (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n A custom currency used to denominate credit-based entitlements and pricing\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `metadata: object`\n - `symbol: string`\n - `units: { plural: string; singular: string; }`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse);\n}\n```",
|
|
2372
2373
|
perLanguage: {
|
|
2373
2374
|
typescript: {
|
|
2374
|
-
method: 'client.v1.
|
|
2375
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.
|
|
2375
|
+
method: 'client.v1.credits.customCurrencies.list',
|
|
2376
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse.id);\n}",
|
|
2376
2377
|
},
|
|
2377
2378
|
python: {
|
|
2378
|
-
method: 'v1.
|
|
2379
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.
|
|
2379
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2380
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.credits.custom_currencies.list()\npage = page.data[0]\nprint(page.id)',
|
|
2380
2381
|
},
|
|
2381
2382
|
java: {
|
|
2382
|
-
method: 'v1().
|
|
2383
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2383
|
+
method: 'v1().credits().customCurrencies().list',
|
|
2384
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListPage;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyListPage page = client.v1().credits().customCurrencies().list();\n }\n}',
|
|
2384
2385
|
},
|
|
2385
2386
|
go: {
|
|
2386
|
-
method: 'client.V1.
|
|
2387
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.
|
|
2387
|
+
method: 'client.V1.Credits.CustomCurrencies.List',
|
|
2388
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Credits.CustomCurrencies.List(context.TODO(), stigg.V1CreditCustomCurrencyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2388
2389
|
},
|
|
2389
2390
|
ruby: {
|
|
2390
|
-
method: 'v1.
|
|
2391
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2391
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2392
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.custom_currencies.list\n\nputs(page)',
|
|
2392
2393
|
},
|
|
2393
2394
|
cli: {
|
|
2394
2395
|
method: 'custom_currencies list',
|
|
2395
|
-
example: "stigg v1:
|
|
2396
|
+
example: "stigg v1:credits:custom-currencies list \\\n --api-key 'My API Key'",
|
|
2396
2397
|
},
|
|
2397
2398
|
csharp: {
|
|
2398
|
-
method: 'V1.
|
|
2399
|
-
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.
|
|
2399
|
+
method: 'V1.Credits.CustomCurrencies.List',
|
|
2400
|
+
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.Credits.CustomCurrencies.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2400
2401
|
},
|
|
2401
2402
|
http: {
|
|
2402
2403
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2409,8 +2410,8 @@ const EMBEDDED_METHODS = [
|
|
|
2409
2410
|
httpMethod: 'post',
|
|
2410
2411
|
summary: 'Create custom currency',
|
|
2411
2412
|
description: 'Creates a new custom currency in the environment.',
|
|
2412
|
-
stainlessPath: '(resource) v1.
|
|
2413
|
-
qualified: 'client.v1.
|
|
2413
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) create',
|
|
2414
|
+
qualified: 'client.v1.credits.customCurrencies.create',
|
|
2414
2415
|
params: [
|
|
2415
2416
|
'id: string;',
|
|
2416
2417
|
'displayName: string;',
|
|
@@ -2420,35 +2421,35 @@ const EMBEDDED_METHODS = [
|
|
|
2420
2421
|
'units?: { plural: string; singular: string; };',
|
|
2421
2422
|
],
|
|
2422
2423
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2423
|
-
markdown: "## create\n\n`client.v1.
|
|
2424
|
+
markdown: "## create\n\n`client.v1.credits.customCurrencies.create(id: string, displayName: string, description?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies`\n\nCreates a new custom currency in the environment.\n\n### Parameters\n\n- `id: string`\n The unique identifier for the new custom currency\n\n- `displayName: string`\n The display name of the custom currency\n\n- `description?: string`\n Description of the currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.create({ id: 'id', displayName: 'displayName' });\n\nconsole.log(customCurrencyResponse);\n```",
|
|
2424
2425
|
perLanguage: {
|
|
2425
2426
|
typescript: {
|
|
2426
|
-
method: 'client.v1.
|
|
2427
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2427
|
+
method: 'client.v1.credits.customCurrencies.create',
|
|
2428
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.create({\n id: 'id',\n displayName: 'displayName',\n});\n\nconsole.log(customCurrencyResponse.data);",
|
|
2428
2429
|
},
|
|
2429
2430
|
python: {
|
|
2430
|
-
method: 'v1.
|
|
2431
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2431
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2432
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.create(\n id="id",\n display_name="displayName",\n)\nprint(custom_currency_response.data)',
|
|
2432
2433
|
},
|
|
2433
2434
|
java: {
|
|
2434
|
-
method: 'v1().
|
|
2435
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2435
|
+
method: 'v1().credits().customCurrencies().create',
|
|
2436
|
+
example: '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}',
|
|
2436
2437
|
},
|
|
2437
2438
|
go: {
|
|
2438
|
-
method: 'client.V1.
|
|
2439
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2439
|
+
method: 'client.V1.Credits.CustomCurrencies.New',
|
|
2440
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.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',
|
|
2440
2441
|
},
|
|
2441
2442
|
ruby: {
|
|
2442
|
-
method: 'v1.
|
|
2443
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2443
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2444
|
+
example: '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)',
|
|
2444
2445
|
},
|
|
2445
2446
|
cli: {
|
|
2446
2447
|
method: 'custom_currencies create',
|
|
2447
|
-
example: "stigg v1:
|
|
2448
|
+
example: "stigg v1:credits:custom-currencies create \\\n --api-key 'My API Key' \\\n --id id \\\n --display-name displayName",
|
|
2448
2449
|
},
|
|
2449
2450
|
csharp: {
|
|
2450
|
-
method: 'V1.
|
|
2451
|
-
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar
|
|
2451
|
+
method: 'V1.Credits.CustomCurrencies.Create',
|
|
2452
|
+
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Create(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2452
2453
|
},
|
|
2453
2454
|
http: {
|
|
2454
2455
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
@@ -2461,8 +2462,8 @@ const EMBEDDED_METHODS = [
|
|
|
2461
2462
|
httpMethod: 'patch',
|
|
2462
2463
|
summary: 'Update custom currency',
|
|
2463
2464
|
description: 'Updates an existing custom currency. Only the supplied fields are modified.',
|
|
2464
|
-
stainlessPath: '(resource) v1.
|
|
2465
|
-
qualified: 'client.v1.
|
|
2465
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) update',
|
|
2466
|
+
qualified: 'client.v1.credits.customCurrencies.update',
|
|
2466
2467
|
params: [
|
|
2467
2468
|
'currencyId: string;',
|
|
2468
2469
|
'description?: string;',
|
|
@@ -2472,35 +2473,35 @@ const EMBEDDED_METHODS = [
|
|
|
2472
2473
|
'units?: { plural: string; singular: string; };',
|
|
2473
2474
|
],
|
|
2474
2475
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2475
|
-
markdown: "## update\n\n`client.v1.
|
|
2476
|
+
markdown: "## update\n\n`client.v1.credits.customCurrencies.update(currencyId: string, description?: string, displayName?: string, metadata?: object, symbol?: string, units?: { plural: string; singular: string; }): { data: object; }`\n\n**patch** `/api/v1/credits/custom-currencies/{currencyId}`\n\nUpdates an existing custom currency. Only the supplied fields are modified.\n\n### Parameters\n\n- `currencyId: string`\n\n- `description?: string`\n A human-readable description of the custom currency. Send an empty string to clear.\n\n- `displayName?: string`\n The display name of the custom currency\n\n- `metadata?: object`\n Additional metadata to attach to the custom currency\n\n- `symbol?: string`\n The symbol used to represent the custom currency. Send an empty string to clear.\n\n- `units?: { plural: string; singular: string; }`\n Singular and plural unit labels for a custom currency. Both fields are required when supplied.\n - `plural: string`\n Plural form of the unit label\n - `singular: string`\n Singular form of the unit label\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
2476
2477
|
perLanguage: {
|
|
2477
2478
|
typescript: {
|
|
2478
|
-
method: 'client.v1.
|
|
2479
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2479
|
+
method: 'client.v1.credits.customCurrencies.update',
|
|
2480
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
|
|
2480
2481
|
},
|
|
2481
2482
|
python: {
|
|
2482
|
-
method: 'v1.
|
|
2483
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2483
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2484
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.update(\n currency_id="currencyId",\n)\nprint(custom_currency_response.data)',
|
|
2484
2485
|
},
|
|
2485
2486
|
java: {
|
|
2486
|
-
method: 'v1().
|
|
2487
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2487
|
+
method: 'v1().credits().customCurrencies().update',
|
|
2488
|
+
example: '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}',
|
|
2488
2489
|
},
|
|
2489
2490
|
go: {
|
|
2490
|
-
method: 'client.V1.
|
|
2491
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2491
|
+
method: 'client.V1.Credits.CustomCurrencies.Update',
|
|
2492
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.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',
|
|
2492
2493
|
},
|
|
2493
2494
|
ruby: {
|
|
2494
|
-
method: 'v1.
|
|
2495
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2495
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2496
|
+
example: '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)',
|
|
2496
2497
|
},
|
|
2497
2498
|
cli: {
|
|
2498
2499
|
method: 'custom_currencies update',
|
|
2499
|
-
example: "stigg v1:
|
|
2500
|
+
example: "stigg v1:credits:custom-currencies update \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2500
2501
|
},
|
|
2501
2502
|
csharp: {
|
|
2502
|
-
method: 'V1.
|
|
2503
|
-
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2503
|
+
method: 'V1.Credits.CustomCurrencies.Update',
|
|
2504
|
+
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2504
2505
|
},
|
|
2505
2506
|
http: {
|
|
2506
2507
|
example: "curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
@@ -2513,39 +2514,39 @@ const EMBEDDED_METHODS = [
|
|
|
2513
2514
|
httpMethod: 'post',
|
|
2514
2515
|
summary: 'Archive custom currency',
|
|
2515
2516
|
description: 'Archives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.',
|
|
2516
|
-
stainlessPath: '(resource) v1.
|
|
2517
|
-
qualified: 'client.v1.
|
|
2517
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) archive',
|
|
2518
|
+
qualified: 'client.v1.credits.customCurrencies.archive',
|
|
2518
2519
|
params: ['currencyId: string;'],
|
|
2519
2520
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2520
|
-
markdown: "## archive\n\n`client.v1.
|
|
2521
|
+
markdown: "## archive\n\n`client.v1.credits.customCurrencies.archive(currencyId: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/archive`\n\nArchives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
2521
2522
|
perLanguage: {
|
|
2522
2523
|
typescript: {
|
|
2523
|
-
method: 'client.v1.
|
|
2524
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2524
|
+
method: 'client.v1.credits.customCurrencies.archive',
|
|
2525
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
|
|
2525
2526
|
},
|
|
2526
2527
|
python: {
|
|
2527
|
-
method: 'v1.
|
|
2528
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2528
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2529
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.archive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
|
|
2529
2530
|
},
|
|
2530
2531
|
java: {
|
|
2531
|
-
method: 'v1().
|
|
2532
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2532
|
+
method: 'v1().credits().customCurrencies().archive',
|
|
2533
|
+
example: '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}',
|
|
2533
2534
|
},
|
|
2534
2535
|
go: {
|
|
2535
|
-
method: 'client.V1.
|
|
2536
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2536
|
+
method: 'client.V1.Credits.CustomCurrencies.Archive',
|
|
2537
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Archive(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrencyResponse.Data)\n}\n',
|
|
2537
2538
|
},
|
|
2538
2539
|
ruby: {
|
|
2539
|
-
method: 'v1.
|
|
2540
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2540
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2541
|
+
example: '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)',
|
|
2541
2542
|
},
|
|
2542
2543
|
cli: {
|
|
2543
2544
|
method: 'custom_currencies archive',
|
|
2544
|
-
example: "stigg v1:
|
|
2545
|
+
example: "stigg v1:credits:custom-currencies archive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2545
2546
|
},
|
|
2546
2547
|
csharp: {
|
|
2547
|
-
method: 'V1.
|
|
2548
|
-
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2548
|
+
method: 'V1.Credits.CustomCurrencies.Archive',
|
|
2549
|
+
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2549
2550
|
},
|
|
2550
2551
|
http: {
|
|
2551
2552
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2558,39 +2559,39 @@ const EMBEDDED_METHODS = [
|
|
|
2558
2559
|
httpMethod: 'post',
|
|
2559
2560
|
summary: 'Unarchive custom currency',
|
|
2560
2561
|
description: 'Restores a previously archived custom currency. Fails if another active currency with the same ID already exists.',
|
|
2561
|
-
stainlessPath: '(resource) v1.
|
|
2562
|
-
qualified: 'client.v1.
|
|
2562
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) unarchive',
|
|
2563
|
+
qualified: 'client.v1.credits.customCurrencies.unarchive',
|
|
2563
2564
|
params: ['currencyId: string;'],
|
|
2564
2565
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2565
|
-
markdown: "## unarchive\n\n`client.v1.
|
|
2566
|
+
markdown: "## unarchive\n\n`client.v1.credits.customCurrencies.unarchive(currencyId: string): { data: object; }`\n\n**post** `/api/v1/credits/custom-currencies/{currencyId}/unarchive`\n\nRestores a previously archived custom currency. Fails if another active currency with the same ID already exists.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }`\n Response object\n\n - `data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse);\n```",
|
|
2566
2567
|
perLanguage: {
|
|
2567
2568
|
typescript: {
|
|
2568
|
-
method: 'client.v1.
|
|
2569
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2569
|
+
method: 'client.v1.credits.customCurrencies.unarchive',
|
|
2570
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
|
|
2570
2571
|
},
|
|
2571
2572
|
python: {
|
|
2572
|
-
method: 'v1.
|
|
2573
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2573
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2574
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.unarchive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
|
|
2574
2575
|
},
|
|
2575
2576
|
java: {
|
|
2576
|
-
method: 'v1().
|
|
2577
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2577
|
+
method: 'v1().credits().customCurrencies().unarchive',
|
|
2578
|
+
example: '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}',
|
|
2578
2579
|
},
|
|
2579
2580
|
go: {
|
|
2580
|
-
method: 'client.V1.
|
|
2581
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2581
|
+
method: 'client.V1.Credits.CustomCurrencies.Unarchive',
|
|
2582
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcustomCurrencyResponse, err := client.V1.Credits.CustomCurrencies.Unarchive(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", customCurrencyResponse.Data)\n}\n',
|
|
2582
2583
|
},
|
|
2583
2584
|
ruby: {
|
|
2584
|
-
method: 'v1.
|
|
2585
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2585
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2586
|
+
example: '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)',
|
|
2586
2587
|
},
|
|
2587
2588
|
cli: {
|
|
2588
2589
|
method: 'custom_currencies unarchive',
|
|
2589
|
-
example: "stigg v1:
|
|
2590
|
+
example: "stigg v1:credits:custom-currencies unarchive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2590
2591
|
},
|
|
2591
2592
|
csharp: {
|
|
2592
|
-
method: 'V1.
|
|
2593
|
-
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2593
|
+
method: 'V1.Credits.CustomCurrencies.Unarchive',
|
|
2594
|
+
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2594
2595
|
},
|
|
2595
2596
|
http: {
|
|
2596
2597
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2603,39 +2604,39 @@ const EMBEDDED_METHODS = [
|
|
|
2603
2604
|
httpMethod: 'get',
|
|
2604
2605
|
summary: 'List custom currency associated entities',
|
|
2605
2606
|
description: 'Lists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.',
|
|
2606
|
-
stainlessPath: '(resource) v1.
|
|
2607
|
-
qualified: 'client.v1.
|
|
2607
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list_associated_entities',
|
|
2608
|
+
qualified: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2608
2609
|
params: ['currencyId: string;'],
|
|
2609
2610
|
response: '{ data: { id: string; displayName: string; type: string; }[]; }',
|
|
2610
|
-
markdown: "## list_associated_entities\n\n`client.v1.
|
|
2611
|
+
markdown: "## list_associated_entities\n\n`client.v1.credits.customCurrencies.listAssociatedEntities(currencyId: string): { data: object[]; }`\n\n**get** `/api/v1/credits/custom-currencies/{currencyId}/associated-entities`\n\nLists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; displayName: string; type: string; }[]; }`\n List of entities (plans or addons) that reference a custom currency\n\n - `data: { id: string; displayName: string; type: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response);\n```",
|
|
2611
2612
|
perLanguage: {
|
|
2612
2613
|
typescript: {
|
|
2613
|
-
method: 'client.v1.
|
|
2614
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2614
|
+
method: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2615
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response.data);",
|
|
2615
2616
|
},
|
|
2616
2617
|
python: {
|
|
2617
|
-
method: 'v1.
|
|
2618
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.
|
|
2618
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2619
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.custom_currencies.list_associated_entities(\n "currencyId",\n)\nprint(response.data)',
|
|
2619
2620
|
},
|
|
2620
2621
|
java: {
|
|
2621
|
-
method: 'v1().
|
|
2622
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2622
|
+
method: 'v1().credits().customCurrencies().listAssociatedEntities',
|
|
2623
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListAssociatedEntitiesParams;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListAssociatedEntitiesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyListAssociatedEntitiesResponse response = client.v1().credits().customCurrencies().listAssociatedEntities("currencyId");\n }\n}',
|
|
2623
2624
|
},
|
|
2624
2625
|
go: {
|
|
2625
|
-
method: 'client.V1.
|
|
2626
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.
|
|
2626
|
+
method: 'client.V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2627
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.CustomCurrencies.ListAssociatedEntities(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2627
2628
|
},
|
|
2628
2629
|
ruby: {
|
|
2629
|
-
method: 'v1.
|
|
2630
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2630
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2631
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.custom_currencies.list_associated_entities("currencyId")\n\nputs(response)',
|
|
2631
2632
|
},
|
|
2632
2633
|
cli: {
|
|
2633
2634
|
method: 'custom_currencies list_associated_entities',
|
|
2634
|
-
example: "stigg v1:
|
|
2635
|
+
example: "stigg v1:credits:custom-currencies list-associated-entities \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2635
2636
|
},
|
|
2636
2637
|
csharp: {
|
|
2637
|
-
method: 'V1.
|
|
2638
|
-
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.
|
|
2638
|
+
method: 'V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2639
|
+
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.Credits.CustomCurrencies.ListAssociatedEntities(parameters);\n\nConsole.WriteLine(response);',
|
|
2639
2640
|
},
|
|
2640
2641
|
http: {
|
|
2641
2642
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -3330,6 +3331,51 @@ const EMBEDDED_METHODS = [
|
|
|
3330
3331
|
},
|
|
3331
3332
|
},
|
|
3332
3333
|
},
|
|
3334
|
+
{
|
|
3335
|
+
name: 'list_charges',
|
|
3336
|
+
endpoint: '/api/v1/addons/{id}/charges',
|
|
3337
|
+
httpMethod: 'get',
|
|
3338
|
+
summary: 'List addon charges',
|
|
3339
|
+
description: 'Retrieves the list of charges configured on an addon.',
|
|
3340
|
+
stainlessPath: '(resource) v1.addons > (method) list_charges',
|
|
3341
|
+
qualified: 'client.v1.addons.listCharges',
|
|
3342
|
+
params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
|
|
3343
|
+
response: "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
3344
|
+
markdown: "## list_charges\n\n`client.v1.addons.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; 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 addon of client.v1.addons.listCharges('x')) {\n console.log(addon);\n}\n```",
|
|
3345
|
+
perLanguage: {
|
|
3346
|
+
typescript: {
|
|
3347
|
+
method: 'client.v1.addons.listCharges',
|
|
3348
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const addon of client.v1.addons.listCharges('x')) {\n console.log(addon.id);\n}",
|
|
3349
|
+
},
|
|
3350
|
+
python: {
|
|
3351
|
+
method: 'v1.addons.list_charges',
|
|
3352
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.addons.list_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
|
|
3353
|
+
},
|
|
3354
|
+
java: {
|
|
3355
|
+
method: 'v1().addons().listCharges',
|
|
3356
|
+
example: '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}',
|
|
3357
|
+
},
|
|
3358
|
+
go: {
|
|
3359
|
+
method: 'client.V1.Addons.ListCharges',
|
|
3360
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.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',
|
|
3361
|
+
},
|
|
3362
|
+
ruby: {
|
|
3363
|
+
method: 'v1.addons.list_charges',
|
|
3364
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.addons.list_charges("x")\n\nputs(page)',
|
|
3365
|
+
},
|
|
3366
|
+
cli: {
|
|
3367
|
+
method: 'addons list_charges',
|
|
3368
|
+
example: "stigg v1:addons list-charges \\\n --api-key 'My API Key' \\\n --id x",
|
|
3369
|
+
},
|
|
3370
|
+
csharp: {
|
|
3371
|
+
method: 'V1.Addons.ListCharges',
|
|
3372
|
+
example: 'AddonListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Addons.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3373
|
+
},
|
|
3374
|
+
http: {
|
|
3375
|
+
example: 'curl https://api.stigg.io/api/v1/addons/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3376
|
+
},
|
|
3377
|
+
},
|
|
3378
|
+
},
|
|
3333
3379
|
{
|
|
3334
3380
|
name: 'list',
|
|
3335
3381
|
endpoint: '/api/v1/addons/{addonId}/entitlements',
|
|
@@ -3904,6 +3950,96 @@ const EMBEDDED_METHODS = [
|
|
|
3904
3950
|
},
|
|
3905
3951
|
},
|
|
3906
3952
|
},
|
|
3953
|
+
{
|
|
3954
|
+
name: 'list_charges',
|
|
3955
|
+
endpoint: '/api/v1/plans/{id}/charges',
|
|
3956
|
+
httpMethod: 'get',
|
|
3957
|
+
summary: 'List plan charges',
|
|
3958
|
+
description: 'Retrieves the list of charges configured on a plan.',
|
|
3959
|
+
stainlessPath: '(resource) v1.plans > (method) list_charges',
|
|
3960
|
+
qualified: 'client.v1.plans.listCharges',
|
|
3961
|
+
params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
|
|
3962
|
+
response: "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
3963
|
+
markdown: "## list_charges\n\n`client.v1.plans.listCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; 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 plan of client.v1.plans.listCharges('x')) {\n console.log(plan);\n}\n```",
|
|
3964
|
+
perLanguage: {
|
|
3965
|
+
typescript: {
|
|
3966
|
+
method: 'client.v1.plans.listCharges',
|
|
3967
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const plan of client.v1.plans.listCharges('x')) {\n console.log(plan.id);\n}",
|
|
3968
|
+
},
|
|
3969
|
+
python: {
|
|
3970
|
+
method: 'v1.plans.list_charges',
|
|
3971
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.plans.list_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
|
|
3972
|
+
},
|
|
3973
|
+
java: {
|
|
3974
|
+
method: 'v1().plans().listCharges',
|
|
3975
|
+
example: '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}',
|
|
3976
|
+
},
|
|
3977
|
+
go: {
|
|
3978
|
+
method: 'client.V1.Plans.ListCharges',
|
|
3979
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.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',
|
|
3980
|
+
},
|
|
3981
|
+
ruby: {
|
|
3982
|
+
method: 'v1.plans.list_charges',
|
|
3983
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.plans.list_charges("x")\n\nputs(page)',
|
|
3984
|
+
},
|
|
3985
|
+
cli: {
|
|
3986
|
+
method: 'plans list_charges',
|
|
3987
|
+
example: "stigg v1:plans list-charges \\\n --api-key 'My API Key' \\\n --id x",
|
|
3988
|
+
},
|
|
3989
|
+
csharp: {
|
|
3990
|
+
method: 'V1.Plans.ListCharges',
|
|
3991
|
+
example: 'PlanListChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
3992
|
+
},
|
|
3993
|
+
http: {
|
|
3994
|
+
example: 'curl https://api.stigg.io/api/v1/plans/$ID/charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
3995
|
+
},
|
|
3996
|
+
},
|
|
3997
|
+
},
|
|
3998
|
+
{
|
|
3999
|
+
name: 'list_overage_charges',
|
|
4000
|
+
endpoint: '/api/v1/plans/{id}/overage-charges',
|
|
4001
|
+
httpMethod: 'get',
|
|
4002
|
+
summary: 'List plan overage charges',
|
|
4003
|
+
description: 'Retrieves the list of overage charges configured on a plan.',
|
|
4004
|
+
stainlessPath: '(resource) v1.plans > (method) list_overage_charges',
|
|
4005
|
+
qualified: 'client.v1.plans.listOverageCharges',
|
|
4006
|
+
params: ['id: string;', 'after?: string;', 'before?: string;', 'limit?: number;'],
|
|
4007
|
+
response: "{ id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: { amount: number; currency: string; }; unitPrice?: { amount: number; currency: string; }; upTo?: number; }[]; tiersMode?: 'VOLUME' | 'GRADUATED'; topUpCustomCurrencyId?: string; usedInSubscriptions?: boolean; }",
|
|
4008
|
+
markdown: "## list_overage_charges\n\n`client.v1.plans.listOverageCharges(id: string, after?: string, before?: string, limit?: number): { id: string; billingCadence: 'RECURRING' | 'ONE_OFF'; billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED'; billingPeriod: 'MONTHLY' | 'ANNUALLY'; createdAt: string; billingCountryCode?: string; billingId?: string; blockSize?: number; creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY'; creditRate?: { amount: number; currencyId: string; costFormula?: string; }; crmId?: string; crmLinkUrl?: string; featureId?: string; maxUnitQuantity?: number; minUnitQuantity?: number; price?: { amount: number; currency: string; }; tiers?: { flatPrice?: object; unitPrice?: object; upTo?: number; }[]; 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 plan of client.v1.plans.listOverageCharges('x')) {\n console.log(plan);\n}\n```",
|
|
4009
|
+
perLanguage: {
|
|
4010
|
+
typescript: {
|
|
4011
|
+
method: 'client.v1.plans.listOverageCharges',
|
|
4012
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const plan of client.v1.plans.listOverageCharges('x')) {\n console.log(plan.id);\n}",
|
|
4013
|
+
},
|
|
4014
|
+
python: {
|
|
4015
|
+
method: 'v1.plans.list_overage_charges',
|
|
4016
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.plans.list_overage_charges(\n id="x",\n)\npage = page.data[0]\nprint(page.id)',
|
|
4017
|
+
},
|
|
4018
|
+
java: {
|
|
4019
|
+
method: 'v1().plans().listOverageCharges',
|
|
4020
|
+
example: '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}',
|
|
4021
|
+
},
|
|
4022
|
+
go: {
|
|
4023
|
+
method: 'client.V1.Plans.ListOverageCharges',
|
|
4024
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.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',
|
|
4025
|
+
},
|
|
4026
|
+
ruby: {
|
|
4027
|
+
method: 'v1.plans.list_overage_charges',
|
|
4028
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.plans.list_overage_charges("x")\n\nputs(page)',
|
|
4029
|
+
},
|
|
4030
|
+
cli: {
|
|
4031
|
+
method: 'plans list_overage_charges',
|
|
4032
|
+
example: "stigg v1:plans list-overage-charges \\\n --api-key 'My API Key' \\\n --id x",
|
|
4033
|
+
},
|
|
4034
|
+
csharp: {
|
|
4035
|
+
method: 'V1.Plans.ListOverageCharges',
|
|
4036
|
+
example: 'PlanListOverageChargesParams parameters = new() { ID = "x" };\n\nvar page = await client.V1.Plans.ListOverageCharges(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4037
|
+
},
|
|
4038
|
+
http: {
|
|
4039
|
+
example: 'curl https://api.stigg.io/api/v1/plans/$ID/overage-charges \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4040
|
+
},
|
|
4041
|
+
},
|
|
4042
|
+
},
|
|
3907
4043
|
{
|
|
3908
4044
|
name: 'list',
|
|
3909
4045
|
endpoint: '/api/v1/plans/{planId}/entitlements',
|
|
@@ -4480,6 +4616,481 @@ const EMBEDDED_METHODS = [
|
|
|
4480
4616
|
},
|
|
4481
4617
|
},
|
|
4482
4618
|
},
|
|
4619
|
+
{
|
|
4620
|
+
name: 'check',
|
|
4621
|
+
endpoint: '/api/v1-beta/customers/{id}/entitlements/check',
|
|
4622
|
+
httpMethod: 'get',
|
|
4623
|
+
summary: 'Check entitlement (beta)',
|
|
4624
|
+
description: '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.',
|
|
4625
|
+
stainlessPath: '(resource) v1-beta.customers.entitlements > (method) check',
|
|
4626
|
+
qualified: 'client.v1Beta.customers.entitlements.check',
|
|
4627
|
+
params: [
|
|
4628
|
+
'id: string;',
|
|
4629
|
+
'currencyId?: string;',
|
|
4630
|
+
'dimensions?: object;',
|
|
4631
|
+
'featureId?: string;',
|
|
4632
|
+
'requestedUsage?: number;',
|
|
4633
|
+
'requestedValues?: string[];',
|
|
4634
|
+
'resourceId?: string;',
|
|
4635
|
+
],
|
|
4636
|
+
response: "{ data: { accessDeniedReason: string; isGranted: boolean; type: 'FEATURE'; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; currentUsage?: number; entitlementUpdatedAt?: string; feature?: { id: string; displayName: string; featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE'; featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM'; }; hasUnlimitedUsage?: boolean; resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR'; usageLimit?: number; usagePeriodAnchor?: string; usagePeriodEnd?: string; usagePeriodStart?: string; validUntil?: string; } | { accessDeniedReason: string; currency: { currencyId: string; displayName: string; description?: string; metadata?: object; unitPlural?: string; unitSingular?: string; }; currentUsage: number; isGranted: boolean; type: 'CREDIT'; usageLimit: number; usageUpdatedAt: string; chains?: { currentUsage: number; entityId: string; isGranted: boolean; usageLimit: number; }[][]; entitlementUpdatedAt?: string; usagePeriodEnd?: string; validUntil?: string; }; }",
|
|
4637
|
+
markdown: "## check\n\n`client.v1Beta.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.v1Beta.customers.entitlements.check('x');\n\nconsole.log(response);\n```",
|
|
4638
|
+
perLanguage: {
|
|
4639
|
+
typescript: {
|
|
4640
|
+
method: 'client.v1Beta.customers.entitlements.check',
|
|
4641
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1Beta.customers.entitlements.check('x');\n\nconsole.log(response.data);",
|
|
4642
|
+
},
|
|
4643
|
+
python: {
|
|
4644
|
+
method: 'v1_beta.customers.entitlements.check',
|
|
4645
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1_beta.customers.entitlements.check(\n id="x",\n)\nprint(response.data)',
|
|
4646
|
+
},
|
|
4647
|
+
java: {
|
|
4648
|
+
method: 'v1Beta().customers().entitlements().check',
|
|
4649
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.entitlements.EntitlementCheckParams;\nimport io.stigg.models.v1beta.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.v1Beta().customers().entitlements().check("x");\n }\n}',
|
|
4650
|
+
},
|
|
4651
|
+
go: {
|
|
4652
|
+
method: 'client.V1Beta.Customers.Entitlements.Check',
|
|
4653
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1Beta.Customers.Entitlements.Check(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1BetaCustomerEntitlementCheckParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
4654
|
+
},
|
|
4655
|
+
ruby: {
|
|
4656
|
+
method: 'v1_beta.customers.entitlements.check',
|
|
4657
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1_beta.customers.entitlements.check("x")\n\nputs(response)',
|
|
4658
|
+
},
|
|
4659
|
+
cli: {
|
|
4660
|
+
method: 'entitlements check',
|
|
4661
|
+
example: "stigg v1-beta:customers:entitlements check \\\n --api-key 'My API Key' \\\n --id x",
|
|
4662
|
+
},
|
|
4663
|
+
csharp: {
|
|
4664
|
+
method: 'V1Beta.Customers.Entitlements.Check',
|
|
4665
|
+
example: 'EntitlementCheckParams parameters = new() { ID = "x" };\n\nvar response = await client.V1Beta.Customers.Entitlements.Check(parameters);\n\nConsole.WriteLine(response);',
|
|
4666
|
+
},
|
|
4667
|
+
http: {
|
|
4668
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entitlements/check \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4669
|
+
},
|
|
4670
|
+
},
|
|
4671
|
+
},
|
|
4672
|
+
{
|
|
4673
|
+
name: 'list',
|
|
4674
|
+
endpoint: '/api/v1-beta/customers/{id}/entities',
|
|
4675
|
+
httpMethod: 'get',
|
|
4676
|
+
summary: 'Get a list of entitys',
|
|
4677
|
+
description: 'Retrieves a paginated list of entities for the given customer.',
|
|
4678
|
+
stainlessPath: '(resource) v1-beta.customers.entities > (method) list',
|
|
4679
|
+
qualified: 'client.v1Beta.customers.entities.list',
|
|
4680
|
+
params: [
|
|
4681
|
+
'id: string;',
|
|
4682
|
+
'after?: string;',
|
|
4683
|
+
'before?: string;',
|
|
4684
|
+
"includeArchived?: 'true' | 'false';",
|
|
4685
|
+
'limit?: number;',
|
|
4686
|
+
'typeRefId?: string;',
|
|
4687
|
+
],
|
|
4688
|
+
response: '{ id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }',
|
|
4689
|
+
markdown: "## list\n\n`client.v1Beta.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.v1Beta.customers.entities.list('id')) {\n console.log(entityListResponse);\n}\n```",
|
|
4690
|
+
perLanguage: {
|
|
4691
|
+
typescript: {
|
|
4692
|
+
method: 'client.v1Beta.customers.entities.list',
|
|
4693
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const entityListResponse of client.v1Beta.customers.entities.list('id')) {\n console.log(entityListResponse.id);\n}",
|
|
4694
|
+
},
|
|
4695
|
+
python: {
|
|
4696
|
+
method: 'v1_beta.customers.entities.list',
|
|
4697
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1_beta.customers.entities.list(\n id="id",\n)\npage = page.data[0]\nprint(page.id)',
|
|
4698
|
+
},
|
|
4699
|
+
java: {
|
|
4700
|
+
method: 'v1Beta().customers().entities().list',
|
|
4701
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.entities.EntityListPage;\nimport io.stigg.models.v1beta.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.v1Beta().customers().entities().list("id");\n }\n}',
|
|
4702
|
+
},
|
|
4703
|
+
go: {
|
|
4704
|
+
method: 'client.V1Beta.Customers.Entities.List',
|
|
4705
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1Beta.Customers.Entities.List(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerEntityListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
4706
|
+
},
|
|
4707
|
+
ruby: {
|
|
4708
|
+
method: 'v1_beta.customers.entities.list',
|
|
4709
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1_beta.customers.entities.list("id")\n\nputs(page)',
|
|
4710
|
+
},
|
|
4711
|
+
cli: {
|
|
4712
|
+
method: 'entities list',
|
|
4713
|
+
example: "stigg v1-beta:customers:entities list \\\n --api-key 'My API Key' \\\n --id id",
|
|
4714
|
+
},
|
|
4715
|
+
csharp: {
|
|
4716
|
+
method: 'V1Beta.Customers.Entities.List',
|
|
4717
|
+
example: 'EntityListParams parameters = new() { ID = "id" };\n\nvar page = await client.V1Beta.Customers.Entities.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4718
|
+
},
|
|
4719
|
+
http: {
|
|
4720
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4721
|
+
},
|
|
4722
|
+
},
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
name: 'upsert',
|
|
4726
|
+
endpoint: '/api/v1-beta/customers/{id}/entities',
|
|
4727
|
+
httpMethod: 'put',
|
|
4728
|
+
summary: 'Upsert entities',
|
|
4729
|
+
description: 'Creates or updates entities in bulk for the given customer. Existing entities matched by id are updated; new ids are created.',
|
|
4730
|
+
stainlessPath: '(resource) v1-beta.customers.entities > (method) upsert',
|
|
4731
|
+
qualified: 'client.v1Beta.customers.entities.upsert',
|
|
4732
|
+
params: ['id: string;', 'entities: { id: string; metadata?: object; typeRefId?: string; }[];'],
|
|
4733
|
+
response: '{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }[]; }',
|
|
4734
|
+
markdown: "## upsert\n\n`client.v1Beta.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.v1Beta.customers.entities.upsert('id', { entities: [{ id: 'user-7f3a0c1d' }, { id: 'user-c4d1b2e9' }] });\n\nconsole.log(response);\n```",
|
|
4735
|
+
perLanguage: {
|
|
4736
|
+
typescript: {
|
|
4737
|
+
method: 'client.v1Beta.customers.entities.upsert',
|
|
4738
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1Beta.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);",
|
|
4739
|
+
},
|
|
4740
|
+
python: {
|
|
4741
|
+
method: 'v1_beta.customers.entities.upsert',
|
|
4742
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1_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)',
|
|
4743
|
+
},
|
|
4744
|
+
java: {
|
|
4745
|
+
method: 'v1Beta().customers().entities().upsert',
|
|
4746
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.entities.EntityUpsertParams;\nimport io.stigg.models.v1beta.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.v1Beta().customers().entities().upsert(params);\n }\n}',
|
|
4747
|
+
},
|
|
4748
|
+
go: {
|
|
4749
|
+
method: 'client.V1Beta.Customers.Entities.Upsert',
|
|
4750
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1Beta.Customers.Entities.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerEntityUpsertParams{\n\t\t\tEntities: []stigg.V1BetaCustomerEntityUpsertParamsEntity{{\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',
|
|
4751
|
+
},
|
|
4752
|
+
ruby: {
|
|
4753
|
+
method: 'v1_beta.customers.entities.upsert',
|
|
4754
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1_beta.customers.entities.upsert("id", entities: [{id: "user-7f3a0c1d"}, {id: "user-c4d1b2e9"}])\n\nputs(response)',
|
|
4755
|
+
},
|
|
4756
|
+
cli: {
|
|
4757
|
+
method: 'entities upsert',
|
|
4758
|
+
example: "stigg v1-beta:customers:entities upsert \\\n --api-key 'My API Key' \\\n --id id \\\n --entity '{id: user-7f3a0c1d}' \\\n --entity '{id: user-c4d1b2e9}'",
|
|
4759
|
+
},
|
|
4760
|
+
csharp: {
|
|
4761
|
+
method: 'V1Beta.Customers.Entities.Upsert',
|
|
4762
|
+
example: 'EntityUpsertParams parameters = new()\n{\n ID = "id",\n Entities =\n [\n new()\n {\n ID = "user-7f3a0c1d",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "jane@acme.com" }, { "role", "admin" }\n },\n TypeRefID = "user",\n },\n new()\n {\n ID = "user-c4d1b2e9",\n Metadata = new Dictionary<string, string>()\n {\n { "email", "john@acme.com" }\n },\n TypeRefID = "user",\n },\n ],\n};\n\nvar response = await client.V1Beta.Customers.Entities.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
4763
|
+
},
|
|
4764
|
+
http: {
|
|
4765
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "entities": [\n {\n "id": "user-7f3a0c1d",\n "metadata": {\n "email": "jane@acme.com",\n "role": "admin"\n },\n "typeRefId": "user"\n },\n {\n "id": "user-c4d1b2e9",\n "metadata": {\n "email": "john@acme.com"\n },\n "typeRefId": "user"\n }\n ]\n }\'',
|
|
4766
|
+
},
|
|
4767
|
+
},
|
|
4768
|
+
},
|
|
4769
|
+
{
|
|
4770
|
+
name: 'retrieve',
|
|
4771
|
+
endpoint: '/api/v1-beta/customers/{id}/entities/{entityId}',
|
|
4772
|
+
httpMethod: 'get',
|
|
4773
|
+
summary: 'Get a single entity by ID',
|
|
4774
|
+
description: 'Retrieves a single entity for the given customer by its identifier.',
|
|
4775
|
+
stainlessPath: '(resource) v1-beta.customers.entities > (method) retrieve',
|
|
4776
|
+
qualified: 'client.v1Beta.customers.entities.retrieve',
|
|
4777
|
+
params: ['id: string;', 'entityId: string;'],
|
|
4778
|
+
response: '{ data: { id: string; archivedAt: string; createdAt: string; metadata: object; typeId: string; updatedAt: string; }; }',
|
|
4779
|
+
markdown: "## retrieve\n\n`client.v1Beta.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.v1Beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity);\n```",
|
|
4780
|
+
perLanguage: {
|
|
4781
|
+
typescript: {
|
|
4782
|
+
method: 'client.v1Beta.customers.entities.retrieve',
|
|
4783
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst entity = await client.v1Beta.customers.entities.retrieve('x', { id: 'id' });\n\nconsole.log(entity.data);",
|
|
4784
|
+
},
|
|
4785
|
+
python: {
|
|
4786
|
+
method: 'v1_beta.customers.entities.retrieve',
|
|
4787
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nentity = client.v1_beta.customers.entities.retrieve(\n entity_id="x",\n id="id",\n)\nprint(entity.data)',
|
|
4788
|
+
},
|
|
4789
|
+
java: {
|
|
4790
|
+
method: 'v1Beta().customers().entities().retrieve',
|
|
4791
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.entities.EntityRetrieveParams;\nimport io.stigg.models.v1beta.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.v1Beta().customers().entities().retrieve(params);\n }\n}',
|
|
4792
|
+
},
|
|
4793
|
+
go: {
|
|
4794
|
+
method: 'client.V1Beta.Customers.Entities.Get',
|
|
4795
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tentity, err := client.V1Beta.Customers.Entities.Get(\n\t\tcontext.TODO(),\n\t\t"x",\n\t\tstigg.V1BetaCustomerEntityGetParams{\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',
|
|
4796
|
+
},
|
|
4797
|
+
ruby: {
|
|
4798
|
+
method: 'v1_beta.customers.entities.retrieve',
|
|
4799
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nentity = stigg.v1_beta.customers.entities.retrieve("x", id: "id")\n\nputs(entity)',
|
|
4800
|
+
},
|
|
4801
|
+
cli: {
|
|
4802
|
+
method: 'entities retrieve',
|
|
4803
|
+
example: "stigg v1-beta:customers:entities retrieve \\\n --api-key 'My API Key' \\\n --id id \\\n --entity-id x",
|
|
4804
|
+
},
|
|
4805
|
+
csharp: {
|
|
4806
|
+
method: 'V1Beta.Customers.Entities.Retrieve',
|
|
4807
|
+
example: 'EntityRetrieveParams parameters = new()\n{\n ID = "id",\n EntityID = "x",\n};\n\nvar entity = await client.V1Beta.Customers.Entities.Retrieve(parameters);\n\nConsole.WriteLine(entity);',
|
|
4808
|
+
},
|
|
4809
|
+
http: {
|
|
4810
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/$ENTITY_ID \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4811
|
+
},
|
|
4812
|
+
},
|
|
4813
|
+
},
|
|
4814
|
+
{
|
|
4815
|
+
name: 'archive',
|
|
4816
|
+
endpoint: '/api/v1-beta/customers/{id}/entities/archive',
|
|
4817
|
+
httpMethod: 'post',
|
|
4818
|
+
summary: 'Archive entities',
|
|
4819
|
+
description: 'Archives entities in bulk for the given customer by id.',
|
|
4820
|
+
stainlessPath: '(resource) v1-beta.customers.entities > (method) archive',
|
|
4821
|
+
qualified: 'client.v1Beta.customers.entities.archive',
|
|
4822
|
+
params: ['id: string;', 'ids: string[];'],
|
|
4823
|
+
response: '{ data: { ids: string[]; }; }',
|
|
4824
|
+
markdown: "## archive\n\n`client.v1Beta.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 entityIDsActionResponseDto = await client.v1Beta.customers.entities.archive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(entityIDsActionResponseDto);\n```",
|
|
4825
|
+
perLanguage: {
|
|
4826
|
+
typescript: {
|
|
4827
|
+
method: 'client.v1Beta.customers.entities.archive',
|
|
4828
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst entityIDsActionResponseDto = await client.v1Beta.customers.entities.archive('id', {\n ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],\n});\n\nconsole.log(entityIDsActionResponseDto.data);",
|
|
4829
|
+
},
|
|
4830
|
+
python: {
|
|
4831
|
+
method: 'v1_beta.customers.entities.archive',
|
|
4832
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nentity_ids_action_response_dto = client.v1_beta.customers.entities.archive(\n id="id",\n ids=["user-7f3a0c1d", "user-c4d1b2e9"],\n)\nprint(entity_ids_action_response_dto.data)',
|
|
4833
|
+
},
|
|
4834
|
+
java: {
|
|
4835
|
+
method: 'v1Beta().customers().entities().archive',
|
|
4836
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.entities.EntityArchiveParams;\nimport io.stigg.models.v1beta.customers.entities.EntityIdsActionResponseDto;\nimport io.stigg.models.v1beta.customers.entities.EntityIdsRequestDto;\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 .entityIdsRequestDto(EntityIdsRequestDto.builder()\n .addId("user-7f3a0c1d")\n .addId("user-c4d1b2e9")\n .build())\n .build();\n EntityIdsActionResponseDto entityIdsActionResponseDto = client.v1Beta().customers().entities().archive(params);\n }\n}',
|
|
4837
|
+
},
|
|
4838
|
+
go: {
|
|
4839
|
+
method: 'client.V1Beta.Customers.Entities.Archive',
|
|
4840
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tentityIDsActionResponseDto, err := client.V1Beta.Customers.Entities.Archive(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerEntityArchiveParams{\n\t\t\tEntityIDsRequestDto: stigg.EntityIDsRequestDtoParam{\n\t\t\t\tIDs: []string{"user-7f3a0c1d", "user-c4d1b2e9"},\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", entityIDsActionResponseDto.Data)\n}\n',
|
|
4841
|
+
},
|
|
4842
|
+
ruby: {
|
|
4843
|
+
method: 'v1_beta.customers.entities.archive',
|
|
4844
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nentity_ids_action_response_dto = stigg.v1_beta.customers.entities.archive("id", ids: ["user-7f3a0c1d", "user-c4d1b2e9"])\n\nputs(entity_ids_action_response_dto)',
|
|
4845
|
+
},
|
|
4846
|
+
cli: {
|
|
4847
|
+
method: 'entities archive',
|
|
4848
|
+
example: "stigg v1-beta:customers:entities archive \\\n --api-key 'My API Key' \\\n --id id \\\n --id user-7f3a0c1d \\\n --id user-c4d1b2e9",
|
|
4849
|
+
},
|
|
4850
|
+
csharp: {
|
|
4851
|
+
method: 'V1Beta.Customers.Entities.Archive',
|
|
4852
|
+
example: 'EntityArchiveParams parameters = new()\n{\n ID = "id",\n Ids =\n [\n "user-7f3a0c1d", "user-c4d1b2e9"\n ],\n};\n\nvar entityIdsActionResponseDto = await client.V1Beta.Customers.Entities.Archive(parameters);\n\nConsole.WriteLine(entityIdsActionResponseDto);',
|
|
4853
|
+
},
|
|
4854
|
+
http: {
|
|
4855
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/archive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
4856
|
+
},
|
|
4857
|
+
},
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
name: 'unarchive',
|
|
4861
|
+
endpoint: '/api/v1-beta/customers/{id}/entities/unarchive',
|
|
4862
|
+
httpMethod: 'post',
|
|
4863
|
+
summary: 'Unarchive entities',
|
|
4864
|
+
description: 'Restores previously archived entities in bulk for the given customer by id.',
|
|
4865
|
+
stainlessPath: '(resource) v1-beta.customers.entities > (method) unarchive',
|
|
4866
|
+
qualified: 'client.v1Beta.customers.entities.unarchive',
|
|
4867
|
+
params: ['id: string;', 'ids: string[];'],
|
|
4868
|
+
response: '{ data: { ids: string[]; }; }',
|
|
4869
|
+
markdown: "## unarchive\n\n`client.v1Beta.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 entityIDsActionResponseDto = await client.v1Beta.customers.entities.unarchive('id', { ids: ['user-7f3a0c1d', 'user-c4d1b2e9'] });\n\nconsole.log(entityIDsActionResponseDto);\n```",
|
|
4870
|
+
perLanguage: {
|
|
4871
|
+
typescript: {
|
|
4872
|
+
method: 'client.v1Beta.customers.entities.unarchive',
|
|
4873
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst entityIDsActionResponseDto = await client.v1Beta.customers.entities.unarchive('id', {\n ids: ['user-7f3a0c1d', 'user-c4d1b2e9'],\n});\n\nconsole.log(entityIDsActionResponseDto.data);",
|
|
4874
|
+
},
|
|
4875
|
+
python: {
|
|
4876
|
+
method: 'v1_beta.customers.entities.unarchive',
|
|
4877
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nentity_ids_action_response_dto = client.v1_beta.customers.entities.unarchive(\n id="id",\n ids=["user-7f3a0c1d", "user-c4d1b2e9"],\n)\nprint(entity_ids_action_response_dto.data)',
|
|
4878
|
+
},
|
|
4879
|
+
java: {
|
|
4880
|
+
method: 'v1Beta().customers().entities().unarchive',
|
|
4881
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.entities.EntityIdsActionResponseDto;\nimport io.stigg.models.v1beta.customers.entities.EntityIdsRequestDto;\nimport io.stigg.models.v1beta.customers.entities.EntityUnarchiveParams;\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 .entityIdsRequestDto(EntityIdsRequestDto.builder()\n .addId("user-7f3a0c1d")\n .addId("user-c4d1b2e9")\n .build())\n .build();\n EntityIdsActionResponseDto entityIdsActionResponseDto = client.v1Beta().customers().entities().unarchive(params);\n }\n}',
|
|
4882
|
+
},
|
|
4883
|
+
go: {
|
|
4884
|
+
method: 'client.V1Beta.Customers.Entities.Unarchive',
|
|
4885
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tentityIDsActionResponseDto, err := client.V1Beta.Customers.Entities.Unarchive(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerEntityUnarchiveParams{\n\t\t\tEntityIDsRequestDto: stigg.EntityIDsRequestDtoParam{\n\t\t\t\tIDs: []string{"user-7f3a0c1d", "user-c4d1b2e9"},\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", entityIDsActionResponseDto.Data)\n}\n',
|
|
4886
|
+
},
|
|
4887
|
+
ruby: {
|
|
4888
|
+
method: 'v1_beta.customers.entities.unarchive',
|
|
4889
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nentity_ids_action_response_dto = stigg.v1_beta.customers.entities.unarchive("id", ids: ["user-7f3a0c1d", "user-c4d1b2e9"])\n\nputs(entity_ids_action_response_dto)',
|
|
4890
|
+
},
|
|
4891
|
+
cli: {
|
|
4892
|
+
method: 'entities unarchive',
|
|
4893
|
+
example: "stigg v1-beta:customers:entities unarchive \\\n --api-key 'My API Key' \\\n --id id \\\n --id user-7f3a0c1d \\\n --id user-c4d1b2e9",
|
|
4894
|
+
},
|
|
4895
|
+
csharp: {
|
|
4896
|
+
method: 'V1Beta.Customers.Entities.Unarchive',
|
|
4897
|
+
example: 'EntityUnarchiveParams parameters = new()\n{\n ID = "id",\n Ids =\n [\n "user-7f3a0c1d", "user-c4d1b2e9"\n ],\n};\n\nvar entityIdsActionResponseDto = await client.V1Beta.Customers.Entities.Unarchive(parameters);\n\nConsole.WriteLine(entityIdsActionResponseDto);',
|
|
4898
|
+
},
|
|
4899
|
+
http: {
|
|
4900
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/entities/unarchive \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "ids": [\n "user-7f3a0c1d",\n "user-c4d1b2e9"\n ]\n }\'',
|
|
4901
|
+
},
|
|
4902
|
+
},
|
|
4903
|
+
},
|
|
4904
|
+
{
|
|
4905
|
+
name: 'list',
|
|
4906
|
+
endpoint: '/api/v1-beta/customers/{id}/assignments',
|
|
4907
|
+
httpMethod: 'get',
|
|
4908
|
+
summary: 'Get a list of assignments',
|
|
4909
|
+
description: '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.',
|
|
4910
|
+
stainlessPath: '(resource) v1-beta.customers.assignments > (method) list',
|
|
4911
|
+
qualified: 'client.v1Beta.customers.assignments.list',
|
|
4912
|
+
params: [
|
|
4913
|
+
'id: string;',
|
|
4914
|
+
'after?: string;',
|
|
4915
|
+
'before?: string;',
|
|
4916
|
+
'capabilityId?: string;',
|
|
4917
|
+
'entityId?: string;',
|
|
4918
|
+
'limit?: number;',
|
|
4919
|
+
],
|
|
4920
|
+
response: "{ id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }",
|
|
4921
|
+
markdown: "## list\n\n`client.v1Beta.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.v1Beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse);\n}\n```",
|
|
4922
|
+
perLanguage: {
|
|
4923
|
+
typescript: {
|
|
4924
|
+
method: 'client.v1Beta.customers.assignments.list',
|
|
4925
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const assignmentListResponse of client.v1Beta.customers.assignments.list('id')) {\n console.log(assignmentListResponse.id);\n}",
|
|
4926
|
+
},
|
|
4927
|
+
python: {
|
|
4928
|
+
method: 'v1_beta.customers.assignments.list',
|
|
4929
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1_beta.customers.assignments.list(\n id="id",\n)\npage = page.data[0]\nprint(page.id)',
|
|
4930
|
+
},
|
|
4931
|
+
java: {
|
|
4932
|
+
method: 'v1Beta().customers().assignments().list',
|
|
4933
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.assignments.AssignmentListPage;\nimport io.stigg.models.v1beta.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.v1Beta().customers().assignments().list("id");\n }\n}',
|
|
4934
|
+
},
|
|
4935
|
+
go: {
|
|
4936
|
+
method: 'client.V1Beta.Customers.Assignments.List',
|
|
4937
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1Beta.Customers.Assignments.List(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerAssignmentListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
4938
|
+
},
|
|
4939
|
+
ruby: {
|
|
4940
|
+
method: 'v1_beta.customers.assignments.list',
|
|
4941
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1_beta.customers.assignments.list("id")\n\nputs(page)',
|
|
4942
|
+
},
|
|
4943
|
+
cli: {
|
|
4944
|
+
method: 'assignments list',
|
|
4945
|
+
example: "stigg v1-beta:customers:assignments list \\\n --api-key 'My API Key' \\\n --id id",
|
|
4946
|
+
},
|
|
4947
|
+
csharp: {
|
|
4948
|
+
method: 'V1Beta.Customers.Assignments.List',
|
|
4949
|
+
example: 'AssignmentListParams parameters = new() { ID = "id" };\n\nvar page = await client.V1Beta.Customers.Assignments.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4950
|
+
},
|
|
4951
|
+
http: {
|
|
4952
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
4953
|
+
},
|
|
4954
|
+
},
|
|
4955
|
+
},
|
|
4956
|
+
{
|
|
4957
|
+
name: 'upsert',
|
|
4958
|
+
endpoint: '/api/v1-beta/customers/{id}/assignments',
|
|
4959
|
+
httpMethod: 'put',
|
|
4960
|
+
summary: 'Upsert assignments',
|
|
4961
|
+
description: '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.',
|
|
4962
|
+
stainlessPath: '(resource) v1-beta.customers.assignments > (method) upsert',
|
|
4963
|
+
qualified: 'client.v1Beta.customers.assignments.upsert',
|
|
4964
|
+
params: [
|
|
4965
|
+
'id: string;',
|
|
4966
|
+
"assignments: { capabilityId: string; entityId: string; cadence?: 'MONTH'; usageLimit?: number; }[];",
|
|
4967
|
+
],
|
|
4968
|
+
response: "{ data: { id: string; cadence: 'MONTH'; capabilityId: string; createdAt: string; entityId: string; updatedAt: string; usageLimit: number; }[]; }",
|
|
4969
|
+
markdown: "## upsert\n\n`client.v1Beta.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.v1Beta.customers.assignments.upsert('id', { assignments: [{ capabilityId: 'compute-minutes', entityId: 'workspace-001' }, { capabilityId: 'compute-minutes', entityId: 'workspace-002' }] });\n\nconsole.log(response);\n```",
|
|
4970
|
+
perLanguage: {
|
|
4971
|
+
typescript: {
|
|
4972
|
+
method: 'client.v1Beta.customers.assignments.upsert',
|
|
4973
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1Beta.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);",
|
|
4974
|
+
},
|
|
4975
|
+
python: {
|
|
4976
|
+
method: 'v1_beta.customers.assignments.upsert',
|
|
4977
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1_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)',
|
|
4978
|
+
},
|
|
4979
|
+
java: {
|
|
4980
|
+
method: 'v1Beta().customers().assignments().upsert',
|
|
4981
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.customers.assignments.AssignmentUpsertParams;\nimport io.stigg.models.v1beta.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.v1Beta().customers().assignments().upsert(params);\n }\n}',
|
|
4982
|
+
},
|
|
4983
|
+
go: {
|
|
4984
|
+
method: 'client.V1Beta.Customers.Assignments.Upsert',
|
|
4985
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1Beta.Customers.Assignments.Upsert(\n\t\tcontext.TODO(),\n\t\t"id",\n\t\tstigg.V1BetaCustomerAssignmentUpsertParams{\n\t\t\tAssignments: []stigg.V1BetaCustomerAssignmentUpsertParamsAssignment{{\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',
|
|
4986
|
+
},
|
|
4987
|
+
ruby: {
|
|
4988
|
+
method: 'v1_beta.customers.assignments.upsert',
|
|
4989
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1_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)',
|
|
4990
|
+
},
|
|
4991
|
+
cli: {
|
|
4992
|
+
method: 'assignments upsert',
|
|
4993
|
+
example: "stigg v1-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}'",
|
|
4994
|
+
},
|
|
4995
|
+
csharp: {
|
|
4996
|
+
method: 'V1Beta.Customers.Assignments.Upsert',
|
|
4997
|
+
example: '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.V1Beta.Customers.Assignments.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
4998
|
+
},
|
|
4999
|
+
http: {
|
|
5000
|
+
example: 'curl https://api.stigg.io/api/v1-beta/customers/$ID/assignments \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "assignments": [\n {\n "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 }\'',
|
|
5001
|
+
},
|
|
5002
|
+
},
|
|
5003
|
+
},
|
|
5004
|
+
{
|
|
5005
|
+
name: 'list',
|
|
5006
|
+
endpoint: '/api/v1-beta/entity-types',
|
|
5007
|
+
httpMethod: 'get',
|
|
5008
|
+
summary: 'Get a list of entity types',
|
|
5009
|
+
description: 'Returns a cursor-paginated list of entity types defined in the environment. Entity types are vendor-defined categories of resource that can be governed (e.g. Org, Team, User).',
|
|
5010
|
+
stainlessPath: '(resource) v1-beta.entity_types > (method) list',
|
|
5011
|
+
qualified: 'client.v1Beta.entityTypes.list',
|
|
5012
|
+
params: ['after?: string;', 'before?: string;', 'limit?: number;'],
|
|
5013
|
+
response: '{ id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }',
|
|
5014
|
+
markdown: "## list\n\n`client.v1Beta.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.v1Beta.entityTypes.list()) {\n console.log(entityTypeListResponse);\n}\n```",
|
|
5015
|
+
perLanguage: {
|
|
5016
|
+
typescript: {
|
|
5017
|
+
method: 'client.v1Beta.entityTypes.list',
|
|
5018
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const entityTypeListResponse of client.v1Beta.entityTypes.list()) {\n console.log(entityTypeListResponse.id);\n}",
|
|
5019
|
+
},
|
|
5020
|
+
python: {
|
|
5021
|
+
method: 'v1_beta.entity_types.list',
|
|
5022
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1_beta.entity_types.list()\npage = page.data[0]\nprint(page.id)',
|
|
5023
|
+
},
|
|
5024
|
+
java: {
|
|
5025
|
+
method: 'v1Beta().entityTypes().list',
|
|
5026
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.entitytypes.EntityTypeListPage;\nimport io.stigg.models.v1beta.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.v1Beta().entityTypes().list();\n }\n}',
|
|
5027
|
+
},
|
|
5028
|
+
go: {
|
|
5029
|
+
method: 'client.V1Beta.EntityTypes.List',
|
|
5030
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1Beta.EntityTypes.List(context.TODO(), stigg.V1BetaEntityTypeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
5031
|
+
},
|
|
5032
|
+
ruby: {
|
|
5033
|
+
method: 'v1_beta.entity_types.list',
|
|
5034
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1_beta.entity_types.list\n\nputs(page)',
|
|
5035
|
+
},
|
|
5036
|
+
cli: {
|
|
5037
|
+
method: 'entity_types list',
|
|
5038
|
+
example: "stigg v1-beta:entity-types list \\\n --api-key 'My API Key'",
|
|
5039
|
+
},
|
|
5040
|
+
csharp: {
|
|
5041
|
+
method: 'V1Beta.EntityTypes.List',
|
|
5042
|
+
example: 'EntityTypeListParams parameters = new();\n\nvar page = await client.V1Beta.EntityTypes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5043
|
+
},
|
|
5044
|
+
http: {
|
|
5045
|
+
example: 'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
5046
|
+
},
|
|
5047
|
+
},
|
|
5048
|
+
},
|
|
5049
|
+
{
|
|
5050
|
+
name: 'upsert',
|
|
5051
|
+
endpoint: '/api/v1-beta/entity-types',
|
|
5052
|
+
httpMethod: 'put',
|
|
5053
|
+
summary: 'Upsert entity types',
|
|
5054
|
+
description: 'Batched create-or-update of entity types. Existing types matched by id are updated; new ids are created. Idempotent — re-submitting the same payload converges to the same state.',
|
|
5055
|
+
stainlessPath: '(resource) v1-beta.entity_types > (method) upsert',
|
|
5056
|
+
qualified: 'client.v1Beta.entityTypes.upsert',
|
|
5057
|
+
params: ['types: { id: string; attributionKeys: string[]; displayName: string; }[];'],
|
|
5058
|
+
response: '{ data: { id: string; attributionKeys: string[]; createdAt: string; displayName: string; updatedAt: string; }[]; }',
|
|
5059
|
+
markdown: "## upsert\n\n`client.v1Beta.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.v1Beta.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```",
|
|
5060
|
+
perLanguage: {
|
|
5061
|
+
typescript: {
|
|
5062
|
+
method: 'client.v1Beta.entityTypes.upsert',
|
|
5063
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1Beta.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);",
|
|
5064
|
+
},
|
|
5065
|
+
python: {
|
|
5066
|
+
method: 'v1_beta.entity_types.upsert',
|
|
5067
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1_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)',
|
|
5068
|
+
},
|
|
5069
|
+
java: {
|
|
5070
|
+
method: 'v1Beta().entityTypes().upsert',
|
|
5071
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1beta.entitytypes.EntityTypeUpsertParams;\nimport io.stigg.models.v1beta.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.v1Beta().entityTypes().upsert(params);\n }\n}',
|
|
5072
|
+
},
|
|
5073
|
+
go: {
|
|
5074
|
+
method: 'client.V1Beta.EntityTypes.Upsert',
|
|
5075
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1Beta.EntityTypes.Upsert(context.TODO(), stigg.V1BetaEntityTypeUpsertParams{\n\t\tTypes: []stigg.V1BetaEntityTypeUpsertParamsType{{\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',
|
|
5076
|
+
},
|
|
5077
|
+
ruby: {
|
|
5078
|
+
method: 'v1_beta.entity_types.upsert',
|
|
5079
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1_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)',
|
|
5080
|
+
},
|
|
5081
|
+
cli: {
|
|
5082
|
+
method: 'entity_types upsert',
|
|
5083
|
+
example: "stigg v1-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}'",
|
|
5084
|
+
},
|
|
5085
|
+
csharp: {
|
|
5086
|
+
method: 'V1Beta.EntityTypes.Upsert',
|
|
5087
|
+
example: 'EntityTypeUpsertParams parameters = new()\n{\n Types =\n [\n new()\n {\n ID = "org",\n AttributionKeys =\n [\n "organizationId"\n ],\n DisplayName = "Organization",\n },\n new()\n {\n ID = "team",\n AttributionKeys =\n [\n "teamId"\n ],\n DisplayName = "Team",\n },\n ],\n};\n\nvar response = await client.V1Beta.EntityTypes.Upsert(parameters);\n\nConsole.WriteLine(response);',
|
|
5088
|
+
},
|
|
5089
|
+
http: {
|
|
5090
|
+
example: 'curl https://api.stigg.io/api/v1-beta/entity-types \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "types": [\n {\n "id": "org",\n "attributionKeys": [\n "organizationId"\n ],\n "displayName": "Organization"\n },\n {\n "id": "team",\n "attributionKeys": [\n "teamId"\n ],\n "displayName": "Team"\n }\n ]\n }\'',
|
|
5091
|
+
},
|
|
5092
|
+
},
|
|
5093
|
+
},
|
|
4483
5094
|
];
|
|
4484
5095
|
const EMBEDDED_READMES = [
|
|
4485
5096
|
{
|