@stigg/typescript-mcp 0.1.0-beta.1 → 0.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/code-tool-worker.js +12 -12
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +12 -12
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +195 -195
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +195 -195
- package/local-docs-search.mjs.map +1 -1
- package/methods.js +24 -24
- package/methods.js.map +1 -1
- package/methods.mjs +24 -24
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +12 -12
- package/src/local-docs-search.ts +195 -198
- package/src/methods.ts +24 -24
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -1105,7 +1105,7 @@ const EMBEDDED_METHODS = [
|
|
|
1105
1105
|
'unitQuantity?: number;',
|
|
1106
1106
|
],
|
|
1107
1107
|
response: "{ data: { id: string; entitlements: object | object[]; status: 'SUCCESS' | 'PAYMENT_REQUIRED'; subscription: object; checkoutBillingId?: string; checkoutUrl?: string; isScheduled?: boolean; }; }",
|
|
1108
|
-
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```",
|
|
1108
|
+
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```",
|
|
1109
1109
|
perLanguage: {
|
|
1110
1110
|
typescript: {
|
|
1111
1111
|
method: 'client.v1.subscriptions.provision',
|
|
@@ -1302,7 +1302,7 @@ const EMBEDDED_METHODS = [
|
|
|
1302
1302
|
'unitQuantity?: number;',
|
|
1303
1303
|
],
|
|
1304
1304
|
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; }; }; }',
|
|
1305
|
-
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
|
|
1305
|
+
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```",
|
|
1306
1306
|
perLanguage: {
|
|
1307
1307
|
typescript: {
|
|
1308
1308
|
method: 'client.v1.subscriptions.preview',
|
|
@@ -1440,7 +1440,7 @@ const EMBEDDED_METHODS = [
|
|
|
1440
1440
|
},
|
|
1441
1441
|
csharp: {
|
|
1442
1442
|
method: 'V1.Subscriptions.Import',
|
|
1443
|
-
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 =
|
|
1443
|
+
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);',
|
|
1444
1444
|
},
|
|
1445
1445
|
http: {
|
|
1446
1446
|
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 }\'',
|
|
@@ -2017,8 +2017,8 @@ const EMBEDDED_METHODS = [
|
|
|
2017
2017
|
httpMethod: 'get',
|
|
2018
2018
|
summary: 'Get credit usage',
|
|
2019
2019
|
description: 'Retrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.',
|
|
2020
|
-
stainlessPath: '(resource) v1.
|
|
2021
|
-
qualified: 'client.v1.
|
|
2020
|
+
stainlessPath: '(resource) v1.credits > (method) get_usage',
|
|
2021
|
+
qualified: 'client.v1.credits.getUsage',
|
|
2022
2022
|
params: [
|
|
2023
2023
|
'customerId: string;',
|
|
2024
2024
|
'currencyId?: string;',
|
|
@@ -2028,35 +2028,35 @@ const EMBEDDED_METHODS = [
|
|
|
2028
2028
|
"timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR';",
|
|
2029
2029
|
],
|
|
2030
2030
|
response: '{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }',
|
|
2031
|
-
markdown: "## get_usage\n\n`client.v1.
|
|
2031
|
+
markdown: "## get_usage\n\n`client.v1.credits.getUsage(customerId: string, currencyId?: string, endDate?: string, resourceId?: string, startDate?: string, timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'): { data: object; }`\n\n**get** `/api/v1/credits/usage`\n\nRetrieves credit usage time-series data for a customer, grouped by feature, over a specified time range.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `endDate?: string`\n End date for the credit usage time range (ISO 8601). Defaults to now when startDate is provided\n\n- `resourceId?: string`\n Filter by resource ID\n\n- `startDate?: string`\n Start date for the credit usage time range (ISO 8601). Takes precedence over timeRange when provided\n\n- `timeRange?: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_YEAR'`\n Time range for usage data (LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_YEAR). Defaults to LAST_MONTH\n\n### Returns\n\n- `{ data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: object[]; totalCredits: number; }[]; }; }`\n Response object\n\n - `data: { currency: { currencyId: string; displayName: string; plural: string; singular: string; symbol: string; }; series: { featureId: string; featureName: string; points: { timestamp: string; value: number; }[]; totalCredits: number; }[]; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response);\n```",
|
|
2032
2032
|
perLanguage: {
|
|
2033
2033
|
typescript: {
|
|
2034
|
-
method: 'client.v1.
|
|
2035
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2034
|
+
method: 'client.v1.credits.getUsage',
|
|
2035
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.getUsage({ customerId: 'customerId' });\n\nconsole.log(response.data);",
|
|
2036
2036
|
},
|
|
2037
2037
|
python: {
|
|
2038
|
-
method: 'v1.
|
|
2039
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.
|
|
2038
|
+
method: 'v1.credits.get_usage',
|
|
2039
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.get_usage(\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2040
2040
|
},
|
|
2041
2041
|
java: {
|
|
2042
|
-
method: 'v1().
|
|
2043
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2042
|
+
method: 'v1().credits().getUsage',
|
|
2043
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditGetUsageParams;\nimport io.stigg.models.v1.credits.CreditGetUsageResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGetUsageParams params = CreditGetUsageParams.builder()\n .customerId("customerId")\n .build();\n CreditGetUsageResponse response = client.v1().credits().getUsage(params);\n }\n}',
|
|
2044
2044
|
},
|
|
2045
2045
|
go: {
|
|
2046
|
-
method: 'client.V1.
|
|
2047
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.
|
|
2046
|
+
method: 'client.V1.Credits.GetUsage',
|
|
2047
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.GetUsage(context.TODO(), stigg.V1CreditGetUsageParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2048
2048
|
},
|
|
2049
2049
|
ruby: {
|
|
2050
|
-
method: 'v1.
|
|
2051
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2050
|
+
method: 'v1.credits.get_usage',
|
|
2051
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.get_usage(customer_id: "customerId")\n\nputs(response)',
|
|
2052
2052
|
},
|
|
2053
2053
|
cli: {
|
|
2054
2054
|
method: 'credits get_usage',
|
|
2055
|
-
example: "stigg v1:
|
|
2055
|
+
example: "stigg v1:credits get-usage \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2056
2056
|
},
|
|
2057
2057
|
csharp: {
|
|
2058
|
-
method: 'V1.
|
|
2059
|
-
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.
|
|
2058
|
+
method: 'V1.Credits.GetUsage',
|
|
2059
|
+
example: 'CreditGetUsageParams parameters = new() { CustomerID = "customerId" };\n\nvar response = await client.V1.Credits.GetUsage(parameters);\n\nConsole.WriteLine(response);',
|
|
2060
2060
|
},
|
|
2061
2061
|
http: {
|
|
2062
2062
|
example: 'curl https://api.stigg.io/api/v1/credits/usage \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2069,39 +2069,39 @@ const EMBEDDED_METHODS = [
|
|
|
2069
2069
|
httpMethod: 'get',
|
|
2070
2070
|
summary: 'Get automatic recharge configuration',
|
|
2071
2071
|
description: 'Retrieves the automatic recharge configuration for a customer and currency. Returns default settings if no configuration exists.',
|
|
2072
|
-
stainlessPath: '(resource) v1.
|
|
2073
|
-
qualified: 'client.v1.
|
|
2072
|
+
stainlessPath: '(resource) v1.credits > (method) get_auto_recharge',
|
|
2073
|
+
qualified: 'client.v1.credits.getAutoRecharge',
|
|
2074
2074
|
params: ['currencyId: string;', 'customerId: string;'],
|
|
2075
2075
|
response: "{ data: { id: string; createdAt: string; currencyId: string; customerId: string; grantExpirationPeriod: '1_MONTH' | '1_YEAR'; isEnabled: boolean; maxSpendLimit: number; targetBalance: number; thresholdType: 'CREDIT_AMOUNT' | 'DOLLAR_AMOUNT'; thresholdValue: number; updatedAt: string; }; }",
|
|
2076
|
-
markdown: "## get_auto_recharge\n\n`client.v1.
|
|
2076
|
+
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```",
|
|
2077
2077
|
perLanguage: {
|
|
2078
2078
|
typescript: {
|
|
2079
|
-
method: 'client.v1.
|
|
2080
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2079
|
+
method: 'client.v1.credits.getAutoRecharge',
|
|
2080
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.getAutoRecharge({\n currencyId: 'currencyId',\n customerId: 'customerId',\n});\n\nconsole.log(response.data);",
|
|
2081
2081
|
},
|
|
2082
2082
|
python: {
|
|
2083
|
-
method: 'v1.
|
|
2084
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.
|
|
2083
|
+
method: 'v1.credits.get_auto_recharge',
|
|
2084
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.get_auto_recharge(\n currency_id="currencyId",\n customer_id="customerId",\n)\nprint(response.data)',
|
|
2085
2085
|
},
|
|
2086
2086
|
java: {
|
|
2087
|
-
method: 'v1().
|
|
2088
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2087
|
+
method: 'v1().credits().getAutoRecharge',
|
|
2088
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.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}',
|
|
2089
2089
|
},
|
|
2090
2090
|
go: {
|
|
2091
|
-
method: 'client.V1.
|
|
2092
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.
|
|
2091
|
+
method: 'client.V1.Credits.GetAutoRecharge',
|
|
2092
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.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',
|
|
2093
2093
|
},
|
|
2094
2094
|
ruby: {
|
|
2095
|
-
method: 'v1.
|
|
2096
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2095
|
+
method: 'v1.credits.get_auto_recharge',
|
|
2096
|
+
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)',
|
|
2097
2097
|
},
|
|
2098
2098
|
cli: {
|
|
2099
2099
|
method: 'credits get_auto_recharge',
|
|
2100
|
-
example: "stigg v1:
|
|
2100
|
+
example: "stigg v1:credits get-auto-recharge \\\n --api-key 'My API Key' \\\n --currency-id currencyId \\\n --customer-id customerId",
|
|
2101
2101
|
},
|
|
2102
2102
|
csharp: {
|
|
2103
|
-
method: 'V1.
|
|
2104
|
-
example: 'CreditGetAutoRechargeParams parameters = new()\n{\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n};\n\nvar response = await client.V1.
|
|
2103
|
+
method: 'V1.Credits.GetAutoRecharge',
|
|
2104
|
+
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);',
|
|
2105
2105
|
},
|
|
2106
2106
|
http: {
|
|
2107
2107
|
example: 'curl https://api.stigg.io/api/v1/credits/auto-recharge \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2114,8 +2114,8 @@ const EMBEDDED_METHODS = [
|
|
|
2114
2114
|
httpMethod: 'get',
|
|
2115
2115
|
summary: 'Get a list of credit ledger events',
|
|
2116
2116
|
description: 'Retrieves a paginated list of credit ledger events for a customer.',
|
|
2117
|
-
stainlessPath: '(resource) v1.
|
|
2118
|
-
qualified: 'client.v1.
|
|
2117
|
+
stainlessPath: '(resource) v1.credits > (method) list_ledger',
|
|
2118
|
+
qualified: 'client.v1.credits.listLedger',
|
|
2119
2119
|
params: [
|
|
2120
2120
|
'customerId: string;',
|
|
2121
2121
|
'after?: string;',
|
|
@@ -2125,35 +2125,35 @@ const EMBEDDED_METHODS = [
|
|
|
2125
2125
|
'resourceId?: string;',
|
|
2126
2126
|
],
|
|
2127
2127
|
response: '{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }',
|
|
2128
|
-
markdown: "## list_ledger\n\n`client.v1.
|
|
2128
|
+
markdown: "## list_ledger\n\n`client.v1.credits.listLedger(customerId: string, after?: string, before?: string, currencyId?: string, limit?: number, resourceId?: string): { amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n\n**get** `/api/v1/credits/ledger`\n\nRetrieves a paginated list of credit ledger events for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID\n\n### Returns\n\n- `{ amount: number; creditCurrencyId: string; creditGrantId: string; customerId: string; eventId: string; eventType: string; featureId: string; resourceId: string; timestamp: string; }`\n A credit ledger event representing a change to credit balance\n\n - `amount: number`\n - `creditCurrencyId: string`\n - `creditGrantId: string`\n - `customerId: string`\n - `eventId: string`\n - `eventType: string`\n - `featureId: string`\n - `resourceId: string`\n - `timestamp: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({ customerId: 'customerId' })) {\n console.log(creditListLedgerResponse);\n}\n```",
|
|
2129
2129
|
perLanguage: {
|
|
2130
2130
|
typescript: {
|
|
2131
|
-
method: 'client.v1.
|
|
2132
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.
|
|
2131
|
+
method: 'client.v1.credits.listLedger',
|
|
2132
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const creditListLedgerResponse of client.v1.credits.listLedger({\n customerId: 'customerId',\n})) {\n console.log(creditListLedgerResponse.amount);\n}",
|
|
2133
2133
|
},
|
|
2134
2134
|
python: {
|
|
2135
|
-
method: 'v1.
|
|
2136
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.
|
|
2135
|
+
method: 'v1.credits.list_ledger',
|
|
2136
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.credits.list_ledger(\n customer_id="customerId",\n)\npage = page.data[0]\nprint(page.amount)',
|
|
2137
2137
|
},
|
|
2138
2138
|
java: {
|
|
2139
|
-
method: 'v1().
|
|
2140
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2139
|
+
method: 'v1().credits().listLedger',
|
|
2140
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.CreditListLedgerPage;\nimport io.stigg.models.v1.credits.CreditListLedgerParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditListLedgerParams params = CreditListLedgerParams.builder()\n .customerId("customerId")\n .build();\n CreditListLedgerPage page = client.v1().credits().listLedger(params);\n }\n}',
|
|
2141
2141
|
},
|
|
2142
2142
|
go: {
|
|
2143
|
-
method: 'client.V1.
|
|
2144
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.
|
|
2143
|
+
method: 'client.V1.Credits.ListLedger',
|
|
2144
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Credits.ListLedger(context.TODO(), stigg.V1CreditListLedgerParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2145
2145
|
},
|
|
2146
2146
|
ruby: {
|
|
2147
|
-
method: 'v1.
|
|
2148
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2147
|
+
method: 'v1.credits.list_ledger',
|
|
2148
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.list_ledger(customer_id: "customerId")\n\nputs(page)',
|
|
2149
2149
|
},
|
|
2150
2150
|
cli: {
|
|
2151
2151
|
method: 'credits list_ledger',
|
|
2152
|
-
example: "stigg v1:
|
|
2152
|
+
example: "stigg v1:credits list-ledger \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2153
2153
|
},
|
|
2154
2154
|
csharp: {
|
|
2155
|
-
method: 'V1.
|
|
2156
|
-
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2155
|
+
method: 'V1.Credits.ListLedger',
|
|
2156
|
+
example: 'CreditListLedgerParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.ListLedger(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2157
2157
|
},
|
|
2158
2158
|
http: {
|
|
2159
2159
|
example: 'curl https://api.stigg.io/api/v1/credits/ledger \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2166,8 +2166,8 @@ const EMBEDDED_METHODS = [
|
|
|
2166
2166
|
httpMethod: 'get',
|
|
2167
2167
|
summary: 'Get a list of credit grants',
|
|
2168
2168
|
description: 'Retrieves a paginated list of credit grants for a customer.',
|
|
2169
|
-
stainlessPath: '(resource) v1.
|
|
2170
|
-
qualified: 'client.v1.
|
|
2169
|
+
stainlessPath: '(resource) v1.credits.grants > (method) list',
|
|
2170
|
+
qualified: 'client.v1.credits.grants.list',
|
|
2171
2171
|
params: [
|
|
2172
2172
|
'customerId: string;',
|
|
2173
2173
|
'after?: string;',
|
|
@@ -2178,35 +2178,35 @@ const EMBEDDED_METHODS = [
|
|
|
2178
2178
|
'resourceId?: string;',
|
|
2179
2179
|
],
|
|
2180
2180
|
response: "{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }",
|
|
2181
|
-
markdown: "## list\n\n`client.v1.
|
|
2181
|
+
markdown: "## list\n\n`client.v1.credits.grants.list(customerId: string, after?: string, before?: string, createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }, currencyId?: string, limit?: number, resourceId?: string): { id: string; amount: number; comment: string; consumedAmount: number; cost: object; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: object; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n**get** `/api/v1/credits/grants`\n\nRetrieves a paginated list of credit grants for a customer.\n\n### Parameters\n\n- `customerId: string`\n Filter by customer ID (required)\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `createdAt?: { gt?: string; gte?: string; lt?: string; lte?: string; }`\n Filter by creation date using range operators: gt, gte, lt, lte\n - `gt?: string`\n Greater than the specified createdAt value\n - `gte?: string`\n Greater than or equal to the specified createdAt value\n - `lt?: string`\n Less than the specified createdAt value\n - `lte?: string`\n Less than or equal to the specified createdAt value\n\n- `currencyId?: string`\n Filter by currency ID\n\n- `limit?: number`\n Maximum number of items to return\n\n- `resourceId?: string`\n Filter by resource ID. When omitted, only grants without a resource are returned\n\n### Returns\n\n- `{ id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n Credit grant object representing allocated credits for a customer\n\n - `id: string`\n - `amount: number`\n - `comment: string`\n - `consumedAmount: number`\n - `cost: { amount: number; currency: string; }`\n - `createdAt: string`\n - `currencyId: string`\n - `customerId: string`\n - `displayName: string`\n - `effectiveAt: string`\n - `expireAt: string`\n - `grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'`\n - `invoiceId: string`\n - `latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }`\n - `metadata: object`\n - `paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'`\n - `priority: number`\n - `resourceId: string`\n - `sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'`\n - `status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'`\n - `updatedAt: string`\n - `voidedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse);\n}\n```",
|
|
2182
2182
|
perLanguage: {
|
|
2183
2183
|
typescript: {
|
|
2184
|
-
method: 'client.v1.
|
|
2185
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.
|
|
2184
|
+
method: 'client.v1.credits.grants.list',
|
|
2185
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const grantListResponse of client.v1.credits.grants.list({ customerId: 'customerId' })) {\n console.log(grantListResponse.id);\n}",
|
|
2186
2186
|
},
|
|
2187
2187
|
python: {
|
|
2188
|
-
method: 'v1.
|
|
2189
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.
|
|
2188
|
+
method: 'v1.credits.grants.list',
|
|
2189
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.credits.grants.list(\n customer_id="customerId",\n)\npage = page.data[0]\nprint(page.id)',
|
|
2190
2190
|
},
|
|
2191
2191
|
java: {
|
|
2192
|
-
method: 'v1().
|
|
2193
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2192
|
+
method: 'v1().credits().grants().list',
|
|
2193
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.GrantListPage;\nimport io.stigg.models.v1.credits.grants.GrantListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n GrantListParams params = GrantListParams.builder()\n .customerId("customerId")\n .build();\n GrantListPage page = client.v1().credits().grants().list(params);\n }\n}',
|
|
2194
2194
|
},
|
|
2195
2195
|
go: {
|
|
2196
|
-
method: 'client.V1.
|
|
2197
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.
|
|
2196
|
+
method: 'client.V1.Credits.Grants.List',
|
|
2197
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Credits.Grants.List(context.TODO(), stigg.V1CreditGrantListParams{\n\t\tCustomerID: "customerId",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2198
2198
|
},
|
|
2199
2199
|
ruby: {
|
|
2200
|
-
method: 'v1.
|
|
2201
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2200
|
+
method: 'v1.credits.grants.list',
|
|
2201
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.grants.list(customer_id: "customerId")\n\nputs(page)',
|
|
2202
2202
|
},
|
|
2203
2203
|
cli: {
|
|
2204
2204
|
method: 'grants list',
|
|
2205
|
-
example: "stigg v1:
|
|
2205
|
+
example: "stigg v1:credits:grants list \\\n --api-key 'My API Key' \\\n --customer-id customerId",
|
|
2206
2206
|
},
|
|
2207
2207
|
csharp: {
|
|
2208
|
-
method: 'V1.
|
|
2209
|
-
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.
|
|
2208
|
+
method: 'V1.Credits.Grants.List',
|
|
2209
|
+
example: 'GrantListParams parameters = new() { CustomerID = "customerId" };\n\nvar page = await client.V1.Credits.Grants.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2210
2210
|
},
|
|
2211
2211
|
http: {
|
|
2212
2212
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2219,8 +2219,8 @@ const EMBEDDED_METHODS = [
|
|
|
2219
2219
|
httpMethod: 'post',
|
|
2220
2220
|
summary: 'Create a credit grant',
|
|
2221
2221
|
description: 'Creates a new credit grant for a customer with specified amount, type, and optional billing configuration.',
|
|
2222
|
-
stainlessPath: '(resource) v1.
|
|
2223
|
-
qualified: 'client.v1.
|
|
2222
|
+
stainlessPath: '(resource) v1.credits.grants > (method) create',
|
|
2223
|
+
qualified: 'client.v1.credits.grants.create',
|
|
2224
2224
|
params: [
|
|
2225
2225
|
'amount: number;',
|
|
2226
2226
|
'currencyId: string;',
|
|
@@ -2239,35 +2239,35 @@ const EMBEDDED_METHODS = [
|
|
|
2239
2239
|
'resourceId?: string;',
|
|
2240
2240
|
],
|
|
2241
2241
|
response: "{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }",
|
|
2242
|
-
markdown: "## create\n\n`client.v1.
|
|
2242
|
+
markdown: "## create\n\n`client.v1.credits.grants.create(amount: number, currencyId: string, customerId: string, displayName: string, grantType: 'PAID' | 'PROMOTIONAL', awaitPaymentConfirmation?: boolean, billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }, comment?: string, cost?: { amount: number; currency: string; }, effectiveAt?: string, expireAt?: string, metadata?: object, paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE', priority?: number, resourceId?: string): { data: object; }`\n\n**post** `/api/v1/credits/grants`\n\nCreates a new credit grant for a customer with specified amount, type, and optional billing configuration.\n\n### Parameters\n\n- `amount: number`\n The credit amount to grant\n\n- `currencyId: string`\n The credit currency ID (required)\n\n- `customerId: string`\n The customer ID to grant credits to (required)\n\n- `displayName: string`\n The display name for the credit grant\n\n- `grantType: 'PAID' | 'PROMOTIONAL'`\n The type of credit grant (PAID, PROMOTIONAL)\n\n- `awaitPaymentConfirmation?: boolean`\n Whether to wait for payment confirmation before returning (default: true)\n\n- `billingInformation?: { billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; invoiceDaysUntilDue?: number; isInvoicePaid?: boolean; }`\n Billing information for the credit grant\n - `billingAddress?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }`\n The billing address\n - `invoiceDaysUntilDue?: number`\n Days until the invoice is due\n - `isInvoicePaid?: boolean`\n Whether the invoice is already paid\n\n- `comment?: string`\n An optional comment on the credit grant\n\n- `cost?: { amount: number; currency: string; }`\n The monetary cost of the credit grant\n - `amount: number`\n The price amount\n - `currency: string`\n ISO 4217 currency code\n\n- `effectiveAt?: string`\n The date when the credit grant becomes effective\n\n- `expireAt?: string`\n The date when the credit grant expires\n\n- `metadata?: object`\n Additional metadata for the credit grant\n\n- `paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE'`\n The payment collection method (CHARGE, INVOICE, NONE)\n\n- `priority?: number`\n The priority of the credit grant (lower number = higher priority)\n\n- `resourceId?: string`\n The resource ID to scope the grant to\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.create({\n amount: 0,\n currencyId: 'currencyId',\n customerId: 'customerId',\n displayName: 'displayName',\n grantType: 'PAID',\n});\n\nconsole.log(creditGrantResponse);\n```",
|
|
2243
2243
|
perLanguage: {
|
|
2244
2244
|
typescript: {
|
|
2245
|
-
method: 'client.v1.
|
|
2246
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.
|
|
2245
|
+
method: 'client.v1.credits.grants.create',
|
|
2246
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.credits.grants.create({\n amount: 0,\n currencyId: 'currencyId',\n customerId: 'customerId',\n displayName: 'displayName',\n grantType: 'PAID',\n});\n\nconsole.log(creditGrantResponse.data);",
|
|
2247
2247
|
},
|
|
2248
2248
|
python: {
|
|
2249
|
-
method: 'v1.
|
|
2250
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.
|
|
2249
|
+
method: 'v1.credits.grants.create',
|
|
2250
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.credits.grants.create(\n amount=0,\n currency_id="currencyId",\n customer_id="customerId",\n display_name="displayName",\n grant_type="PAID",\n)\nprint(credit_grant_response.data)',
|
|
2251
2251
|
},
|
|
2252
2252
|
java: {
|
|
2253
|
-
method: 'v1().
|
|
2254
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2253
|
+
method: 'v1().credits().grants().create',
|
|
2254
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.CreditGrantResponse;\nimport io.stigg.models.v1.credits.grants.GrantCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n GrantCreateParams params = GrantCreateParams.builder()\n .amount(0.0)\n .currencyId("currencyId")\n .customerId("customerId")\n .displayName("displayName")\n .grantType(GrantCreateParams.GrantType.PAID)\n .build();\n CreditGrantResponse creditGrantResponse = client.v1().credits().grants().create(params);\n }\n}',
|
|
2255
2255
|
},
|
|
2256
2256
|
go: {
|
|
2257
|
-
method: 'client.V1.
|
|
2258
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.
|
|
2257
|
+
method: 'client.V1.Credits.Grants.New',
|
|
2258
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.Credits.Grants.New(context.TODO(), stigg.V1CreditGrantNewParams{\n\t\tAmount: 0,\n\t\tCurrencyID: "currencyId",\n\t\tCustomerID: "customerId",\n\t\tDisplayName: "displayName",\n\t\tGrantType: stigg.V1CreditGrantNewParamsGrantTypePaid,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2259
2259
|
},
|
|
2260
2260
|
ruby: {
|
|
2261
|
-
method: 'v1.
|
|
2262
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2261
|
+
method: 'v1.credits.grants.create',
|
|
2262
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.credits.grants.create(\n amount: 0,\n currency_id: "currencyId",\n customer_id: "customerId",\n display_name: "displayName",\n grant_type: :PAID\n)\n\nputs(credit_grant_response)',
|
|
2263
2263
|
},
|
|
2264
2264
|
cli: {
|
|
2265
2265
|
method: 'grants create',
|
|
2266
|
-
example: "stigg v1:
|
|
2266
|
+
example: "stigg v1:credits:grants create \\\n --api-key 'My API Key' \\\n --amount 0 \\\n --currency-id currencyId \\\n --customer-id customerId \\\n --display-name displayName \\\n --grant-type PAID",
|
|
2267
2267
|
},
|
|
2268
2268
|
csharp: {
|
|
2269
|
-
method: 'V1.
|
|
2270
|
-
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.
|
|
2269
|
+
method: 'V1.Credits.Grants.Create',
|
|
2270
|
+
example: 'GrantCreateParams parameters = new()\n{\n Amount = 0,\n CurrencyID = "currencyId",\n CustomerID = "customerId",\n DisplayName = "displayName",\n GrantType = GrantType.Paid,\n};\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Create(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2271
2271
|
},
|
|
2272
2272
|
http: {
|
|
2273
2273
|
example: 'curl https://api.stigg.io/api/v1/credits/grants \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "amount": 0,\n "currencyId": "currencyId",\n "customerId": "customerId",\n "displayName": "displayName",\n "grantType": "PAID"\n }\'',
|
|
@@ -2280,39 +2280,39 @@ const EMBEDDED_METHODS = [
|
|
|
2280
2280
|
httpMethod: 'post',
|
|
2281
2281
|
summary: 'Void credit grant',
|
|
2282
2282
|
description: 'Voids an existing credit grant, preventing further consumption of the remaining credits.',
|
|
2283
|
-
stainlessPath: '(resource) v1.
|
|
2284
|
-
qualified: 'client.v1.
|
|
2283
|
+
stainlessPath: '(resource) v1.credits.grants > (method) void',
|
|
2284
|
+
qualified: 'client.v1.credits.grants.void',
|
|
2285
2285
|
params: ['id: string;'],
|
|
2286
2286
|
response: "{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }",
|
|
2287
|
-
markdown: "## void\n\n`client.v1.
|
|
2287
|
+
markdown: "## void\n\n`client.v1.credits.grants.void(id: string): { data: object; }`\n\n**post** `/api/v1/credits/grants/{id}/void`\n\nVoids an existing credit grant, preventing further consumption of the remaining credits.\n\n### Parameters\n\n- `id: string`\n\n### Returns\n\n- `{ data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }; }`\n Response object\n\n - `data: { id: string; amount: number; comment: string; consumedAmount: number; cost: { amount: number; currency: string; }; createdAt: string; currencyId: string; customerId: string; displayName: string; effectiveAt: string; expireAt: string; grantType: 'PAID' | 'PROMOTIONAL' | 'RECURRING' | 'OVERDRAFT'; invoiceId: string; latestInvoice: { billingId: string; billingReason: 'MANUAL' | 'OTHER'; createdAt: string; currency: string; dueDate: string; errorMessage: string; paymentUrl: string; pdfUrl: string; requiresAction: boolean; status: 'OPEN' | 'PAID' | 'CANCELED'; subTotal: number; tax: number; total: number; updatedAt: string; }; metadata: object; paymentCollection: 'NOT_REQUIRED' | 'PROCESSING' | 'FAILED' | 'ACTION_REQUIRED'; priority: number; resourceId: string; sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT'; status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED'; updatedAt: string; voidedAt: string; }`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse);\n```",
|
|
2288
2288
|
perLanguage: {
|
|
2289
2289
|
typescript: {
|
|
2290
|
-
method: 'client.v1.
|
|
2291
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.
|
|
2290
|
+
method: 'client.v1.credits.grants.void',
|
|
2291
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst creditGrantResponse = await client.v1.credits.grants.void('x');\n\nconsole.log(creditGrantResponse.data);",
|
|
2292
2292
|
},
|
|
2293
2293
|
python: {
|
|
2294
|
-
method: 'v1.
|
|
2295
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.
|
|
2294
|
+
method: 'v1.credits.grants.void',
|
|
2295
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncredit_grant_response = client.v1.credits.grants.void(\n "x",\n)\nprint(credit_grant_response.data)',
|
|
2296
2296
|
},
|
|
2297
2297
|
java: {
|
|
2298
|
-
method: 'v1().
|
|
2299
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2298
|
+
method: 'v1().credits().grants().void_',
|
|
2299
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.grants.CreditGrantResponse;\nimport io.stigg.models.v1.credits.grants.GrantVoidParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CreditGrantResponse creditGrantResponse = client.v1().credits().grants().void_("x");\n }\n}',
|
|
2300
2300
|
},
|
|
2301
2301
|
go: {
|
|
2302
|
-
method: 'client.V1.
|
|
2303
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.
|
|
2302
|
+
method: 'client.V1.Credits.Grants.Void',
|
|
2303
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcreditGrantResponse, err := client.V1.Credits.Grants.Void(context.TODO(), "x")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", creditGrantResponse.Data)\n}\n',
|
|
2304
2304
|
},
|
|
2305
2305
|
ruby: {
|
|
2306
|
-
method: 'v1.
|
|
2307
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.
|
|
2306
|
+
method: 'v1.credits.grants.void',
|
|
2307
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\ncredit_grant_response = stigg.v1.credits.grants.void("x")\n\nputs(credit_grant_response)',
|
|
2308
2308
|
},
|
|
2309
2309
|
cli: {
|
|
2310
2310
|
method: 'grants void',
|
|
2311
|
-
example: "stigg v1:
|
|
2311
|
+
example: "stigg v1:credits:grants void \\\n --api-key 'My API Key' \\\n --id x",
|
|
2312
2312
|
},
|
|
2313
2313
|
csharp: {
|
|
2314
|
-
method: 'V1.
|
|
2315
|
-
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.
|
|
2314
|
+
method: 'V1.Credits.Grants.Void',
|
|
2315
|
+
example: 'GrantVoidParams parameters = new() { ID = "x" };\n\nvar creditGrantResponse = await client.V1.Credits.Grants.Void(parameters);\n\nConsole.WriteLine(creditGrantResponse);',
|
|
2316
2316
|
},
|
|
2317
2317
|
http: {
|
|
2318
2318
|
example: 'curl https://api.stigg.io/api/v1/credits/grants/$ID/void \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2325,39 +2325,39 @@ const EMBEDDED_METHODS = [
|
|
|
2325
2325
|
httpMethod: 'get',
|
|
2326
2326
|
summary: 'Get a list of custom currencys',
|
|
2327
2327
|
description: 'Retrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.',
|
|
2328
|
-
stainlessPath: '(resource) v1.
|
|
2329
|
-
qualified: 'client.v1.
|
|
2328
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list',
|
|
2329
|
+
qualified: 'client.v1.credits.customCurrencies.list',
|
|
2330
2330
|
params: ['after?: string;', 'before?: string;', 'limit?: number;', "status?: 'ACTIVE' | 'ARCHIVED'[];"],
|
|
2331
2331
|
response: '{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }',
|
|
2332
|
-
markdown: "## list\n\n`client.v1.
|
|
2332
|
+
markdown: "## list\n\n`client.v1.credits.customCurrencies.list(after?: string, before?: string, limit?: number, status?: 'ACTIVE' | 'ARCHIVED'[]): { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: object; updatedAt: string; }`\n\n**get** `/api/v1/credits/custom-currencies`\n\nRetrieves a paginated list of custom currencies in the environment. Archived currencies are excluded by default; pass `status=ARCHIVED` (or `status=ACTIVE,ARCHIVED`) to include them.\n\n### Parameters\n\n- `after?: string`\n Return items that come after this cursor\n\n- `before?: string`\n Return items that come before this cursor\n\n- `limit?: number`\n Maximum number of items to return\n\n- `status?: 'ACTIVE' | 'ARCHIVED'[]`\n Filter by custom currency status. Supports comma-separated values (e.g., `ACTIVE,ARCHIVED`). Defaults to `ACTIVE`.\n\n### Returns\n\n- `{ id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }`\n A custom currency used to denominate credit-based entitlements and pricing\n\n - `id: string`\n - `archivedAt: string`\n - `createdAt: string`\n - `description: string`\n - `displayName: string`\n - `metadata: object`\n - `symbol: string`\n - `units: { plural: string; singular: string; }`\n - `updatedAt: string`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse);\n}\n```",
|
|
2333
2333
|
perLanguage: {
|
|
2334
2334
|
typescript: {
|
|
2335
|
-
method: 'client.v1.
|
|
2336
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.
|
|
2335
|
+
method: 'client.v1.credits.customCurrencies.list',
|
|
2336
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const customCurrencyListResponse of client.v1.credits.customCurrencies.list()) {\n console.log(customCurrencyListResponse.id);\n}",
|
|
2337
2337
|
},
|
|
2338
2338
|
python: {
|
|
2339
|
-
method: 'v1.
|
|
2340
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.
|
|
2339
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2340
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\npage = client.v1.credits.custom_currencies.list()\npage = page.data[0]\nprint(page.id)',
|
|
2341
2341
|
},
|
|
2342
2342
|
java: {
|
|
2343
|
-
method: 'v1().
|
|
2344
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2343
|
+
method: 'v1().credits().customCurrencies().list',
|
|
2344
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListPage;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyListPage page = client.v1().credits().customCurrencies().list();\n }\n}',
|
|
2345
2345
|
},
|
|
2346
2346
|
go: {
|
|
2347
|
-
method: 'client.V1.
|
|
2348
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.
|
|
2347
|
+
method: 'client.V1.Credits.CustomCurrencies.List',
|
|
2348
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.V1.Credits.CustomCurrencies.List(context.TODO(), stigg.V1CreditCustomCurrencyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2349
2349
|
},
|
|
2350
2350
|
ruby: {
|
|
2351
|
-
method: 'v1.
|
|
2352
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.
|
|
2351
|
+
method: 'v1.credits.custom_currencies.list',
|
|
2352
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\npage = stigg.v1.credits.custom_currencies.list\n\nputs(page)',
|
|
2353
2353
|
},
|
|
2354
2354
|
cli: {
|
|
2355
2355
|
method: 'custom_currencies list',
|
|
2356
|
-
example: "stigg v1:
|
|
2356
|
+
example: "stigg v1:credits:custom-currencies list \\\n --api-key 'My API Key'",
|
|
2357
2357
|
},
|
|
2358
2358
|
csharp: {
|
|
2359
|
-
method: 'V1.
|
|
2360
|
-
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.
|
|
2359
|
+
method: 'V1.Credits.CustomCurrencies.List',
|
|
2360
|
+
example: 'CustomCurrencyListParams parameters = new();\n\nvar page = await client.V1.Credits.CustomCurrencies.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
2361
2361
|
},
|
|
2362
2362
|
http: {
|
|
2363
2363
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2370,8 +2370,8 @@ const EMBEDDED_METHODS = [
|
|
|
2370
2370
|
httpMethod: 'post',
|
|
2371
2371
|
summary: 'Create custom currency',
|
|
2372
2372
|
description: 'Creates a new custom currency in the environment.',
|
|
2373
|
-
stainlessPath: '(resource) v1.
|
|
2374
|
-
qualified: 'client.v1.
|
|
2373
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) create',
|
|
2374
|
+
qualified: 'client.v1.credits.customCurrencies.create',
|
|
2375
2375
|
params: [
|
|
2376
2376
|
'id: string;',
|
|
2377
2377
|
'displayName: string;',
|
|
@@ -2381,35 +2381,35 @@ const EMBEDDED_METHODS = [
|
|
|
2381
2381
|
'units?: { plural: string; singular: string; };',
|
|
2382
2382
|
],
|
|
2383
2383
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2384
|
-
markdown: "## create\n\n`client.v1.
|
|
2384
|
+
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```",
|
|
2385
2385
|
perLanguage: {
|
|
2386
2386
|
typescript: {
|
|
2387
|
-
method: 'client.v1.
|
|
2388
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2387
|
+
method: 'client.v1.credits.customCurrencies.create',
|
|
2388
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.create({\n id: 'id',\n displayName: 'displayName',\n});\n\nconsole.log(customCurrencyResponse.data);",
|
|
2389
2389
|
},
|
|
2390
2390
|
python: {
|
|
2391
|
-
method: 'v1.
|
|
2392
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2391
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2392
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.create(\n id="id",\n display_name="displayName",\n)\nprint(custom_currency_response.data)',
|
|
2393
2393
|
},
|
|
2394
2394
|
java: {
|
|
2395
|
-
method: 'v1().
|
|
2396
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2395
|
+
method: 'v1().credits().customCurrencies().create',
|
|
2396
|
+
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}',
|
|
2397
2397
|
},
|
|
2398
2398
|
go: {
|
|
2399
|
-
method: 'client.V1.
|
|
2400
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2399
|
+
method: 'client.V1.Credits.CustomCurrencies.New',
|
|
2400
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
2401
2401
|
},
|
|
2402
2402
|
ruby: {
|
|
2403
|
-
method: 'v1.
|
|
2404
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2403
|
+
method: 'v1.credits.custom_currencies.create',
|
|
2404
|
+
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)',
|
|
2405
2405
|
},
|
|
2406
2406
|
cli: {
|
|
2407
2407
|
method: 'custom_currencies create',
|
|
2408
|
-
example: "stigg v1:
|
|
2408
|
+
example: "stigg v1:credits:custom-currencies create \\\n --api-key 'My API Key' \\\n --id id \\\n --display-name displayName",
|
|
2409
2409
|
},
|
|
2410
2410
|
csharp: {
|
|
2411
|
-
method: 'V1.
|
|
2412
|
-
example: 'CustomCurrencyCreateParams parameters = new()\n{\n ID = "id",\n DisplayName = "displayName",\n};\n\nvar
|
|
2411
|
+
method: 'V1.Credits.CustomCurrencies.Create',
|
|
2412
|
+
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);',
|
|
2413
2413
|
},
|
|
2414
2414
|
http: {
|
|
2415
2415
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies \\\n -H \'Content-Type: application/json\' \\\n -H "X-API-KEY: $STIGG_API_KEY" \\\n -d \'{\n "id": "id",\n "displayName": "displayName"\n }\'',
|
|
@@ -2422,8 +2422,8 @@ const EMBEDDED_METHODS = [
|
|
|
2422
2422
|
httpMethod: 'patch',
|
|
2423
2423
|
summary: 'Update custom currency',
|
|
2424
2424
|
description: 'Updates an existing custom currency. Only the supplied fields are modified.',
|
|
2425
|
-
stainlessPath: '(resource) v1.
|
|
2426
|
-
qualified: 'client.v1.
|
|
2425
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) update',
|
|
2426
|
+
qualified: 'client.v1.credits.customCurrencies.update',
|
|
2427
2427
|
params: [
|
|
2428
2428
|
'currencyId: string;',
|
|
2429
2429
|
'description?: string;',
|
|
@@ -2433,35 +2433,35 @@ const EMBEDDED_METHODS = [
|
|
|
2433
2433
|
'units?: { plural: string; singular: string; };',
|
|
2434
2434
|
],
|
|
2435
2435
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2436
|
-
markdown: "## update\n\n`client.v1.
|
|
2436
|
+
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```",
|
|
2437
2437
|
perLanguage: {
|
|
2438
2438
|
typescript: {
|
|
2439
|
-
method: 'client.v1.
|
|
2440
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2439
|
+
method: 'client.v1.credits.customCurrencies.update',
|
|
2440
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.update('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
|
|
2441
2441
|
},
|
|
2442
2442
|
python: {
|
|
2443
|
-
method: 'v1.
|
|
2444
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2443
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2444
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.update(\n currency_id="currencyId",\n)\nprint(custom_currency_response.data)',
|
|
2445
2445
|
},
|
|
2446
2446
|
java: {
|
|
2447
|
-
method: 'v1().
|
|
2448
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2447
|
+
method: 'v1().credits().customCurrencies().update',
|
|
2448
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.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}',
|
|
2449
2449
|
},
|
|
2450
2450
|
go: {
|
|
2451
|
-
method: 'client.V1.
|
|
2452
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2451
|
+
method: 'client.V1.Credits.CustomCurrencies.Update',
|
|
2452
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
2453
2453
|
},
|
|
2454
2454
|
ruby: {
|
|
2455
|
-
method: 'v1.
|
|
2456
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2455
|
+
method: 'v1.credits.custom_currencies.update',
|
|
2456
|
+
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)',
|
|
2457
2457
|
},
|
|
2458
2458
|
cli: {
|
|
2459
2459
|
method: 'custom_currencies update',
|
|
2460
|
-
example: "stigg v1:
|
|
2460
|
+
example: "stigg v1:credits:custom-currencies update \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2461
2461
|
},
|
|
2462
2462
|
csharp: {
|
|
2463
|
-
method: 'V1.
|
|
2464
|
-
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2463
|
+
method: 'V1.Credits.CustomCurrencies.Update',
|
|
2464
|
+
example: 'CustomCurrencyUpdateParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Update(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2465
2465
|
},
|
|
2466
2466
|
http: {
|
|
2467
2467
|
example: "curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"X-API-KEY: $STIGG_API_KEY\" \\\n -d '{}'",
|
|
@@ -2474,39 +2474,39 @@ const EMBEDDED_METHODS = [
|
|
|
2474
2474
|
httpMethod: 'post',
|
|
2475
2475
|
summary: 'Archive custom currency',
|
|
2476
2476
|
description: 'Archives a custom currency. Fails if the currency is still associated with any active plan or addon — use the associated-entities endpoint first to inspect dependencies.',
|
|
2477
|
-
stainlessPath: '(resource) v1.
|
|
2478
|
-
qualified: 'client.v1.
|
|
2477
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) archive',
|
|
2478
|
+
qualified: 'client.v1.credits.customCurrencies.archive',
|
|
2479
2479
|
params: ['currencyId: string;'],
|
|
2480
2480
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2481
|
-
markdown: "## archive\n\n`client.v1.
|
|
2481
|
+
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```",
|
|
2482
2482
|
perLanguage: {
|
|
2483
2483
|
typescript: {
|
|
2484
|
-
method: 'client.v1.
|
|
2485
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2484
|
+
method: 'client.v1.credits.customCurrencies.archive',
|
|
2485
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.archive('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
|
|
2486
2486
|
},
|
|
2487
2487
|
python: {
|
|
2488
|
-
method: 'v1.
|
|
2489
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2488
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2489
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.archive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
|
|
2490
2490
|
},
|
|
2491
2491
|
java: {
|
|
2492
|
-
method: 'v1().
|
|
2493
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2492
|
+
method: 'v1().credits().customCurrencies().archive',
|
|
2493
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.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}',
|
|
2494
2494
|
},
|
|
2495
2495
|
go: {
|
|
2496
|
-
method: 'client.V1.
|
|
2497
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2496
|
+
method: 'client.V1.Credits.CustomCurrencies.Archive',
|
|
2497
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
2498
2498
|
},
|
|
2499
2499
|
ruby: {
|
|
2500
|
-
method: 'v1.
|
|
2501
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2500
|
+
method: 'v1.credits.custom_currencies.archive',
|
|
2501
|
+
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)',
|
|
2502
2502
|
},
|
|
2503
2503
|
cli: {
|
|
2504
2504
|
method: 'custom_currencies archive',
|
|
2505
|
-
example: "stigg v1:
|
|
2505
|
+
example: "stigg v1:credits:custom-currencies archive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2506
2506
|
},
|
|
2507
2507
|
csharp: {
|
|
2508
|
-
method: 'V1.
|
|
2509
|
-
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2508
|
+
method: 'V1.Credits.CustomCurrencies.Archive',
|
|
2509
|
+
example: 'CustomCurrencyArchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Archive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2510
2510
|
},
|
|
2511
2511
|
http: {
|
|
2512
2512
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/archive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2519,39 +2519,39 @@ const EMBEDDED_METHODS = [
|
|
|
2519
2519
|
httpMethod: 'post',
|
|
2520
2520
|
summary: 'Unarchive custom currency',
|
|
2521
2521
|
description: 'Restores a previously archived custom currency. Fails if another active currency with the same ID already exists.',
|
|
2522
|
-
stainlessPath: '(resource) v1.
|
|
2523
|
-
qualified: 'client.v1.
|
|
2522
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) unarchive',
|
|
2523
|
+
qualified: 'client.v1.credits.customCurrencies.unarchive',
|
|
2524
2524
|
params: ['currencyId: string;'],
|
|
2525
2525
|
response: '{ data: { id: string; archivedAt: string; createdAt: string; description: string; displayName: string; metadata: object; symbol: string; units: { plural: string; singular: string; }; updatedAt: string; }; }',
|
|
2526
|
-
markdown: "## unarchive\n\n`client.v1.
|
|
2526
|
+
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```",
|
|
2527
2527
|
perLanguage: {
|
|
2528
2528
|
typescript: {
|
|
2529
|
-
method: 'client.v1.
|
|
2530
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst
|
|
2529
|
+
method: 'client.v1.credits.customCurrencies.unarchive',
|
|
2530
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst customCurrencyResponse = await client.v1.credits.customCurrencies.unarchive('currencyId');\n\nconsole.log(customCurrencyResponse.data);",
|
|
2531
2531
|
},
|
|
2532
2532
|
python: {
|
|
2533
|
-
method: 'v1.
|
|
2534
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\
|
|
2533
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2534
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\ncustom_currency_response = client.v1.credits.custom_currencies.unarchive(\n "currencyId",\n)\nprint(custom_currency_response.data)',
|
|
2535
2535
|
},
|
|
2536
2536
|
java: {
|
|
2537
|
-
method: 'v1().
|
|
2538
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2537
|
+
method: 'v1().credits().customCurrencies().unarchive',
|
|
2538
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.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}',
|
|
2539
2539
|
},
|
|
2540
2540
|
go: {
|
|
2541
|
-
method: 'client.V1.
|
|
2542
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
2541
|
+
method: 'client.V1.Credits.CustomCurrencies.Unarchive',
|
|
2542
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
2543
2543
|
},
|
|
2544
2544
|
ruby: {
|
|
2545
|
-
method: 'v1.
|
|
2546
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\
|
|
2545
|
+
method: 'v1.credits.custom_currencies.unarchive',
|
|
2546
|
+
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)',
|
|
2547
2547
|
},
|
|
2548
2548
|
cli: {
|
|
2549
2549
|
method: 'custom_currencies unarchive',
|
|
2550
|
-
example: "stigg v1:
|
|
2550
|
+
example: "stigg v1:credits:custom-currencies unarchive \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2551
2551
|
},
|
|
2552
2552
|
csharp: {
|
|
2553
|
-
method: 'V1.
|
|
2554
|
-
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar
|
|
2553
|
+
method: 'V1.Credits.CustomCurrencies.Unarchive',
|
|
2554
|
+
example: 'CustomCurrencyUnarchiveParams parameters = new() { CurrencyID = "currencyId" };\n\nvar customCurrencyResponse = await client.V1.Credits.CustomCurrencies.Unarchive(parameters);\n\nConsole.WriteLine(customCurrencyResponse);',
|
|
2555
2555
|
},
|
|
2556
2556
|
http: {
|
|
2557
2557
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/unarchive \\\n -X POST \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|
|
@@ -2564,39 +2564,39 @@ const EMBEDDED_METHODS = [
|
|
|
2564
2564
|
httpMethod: 'get',
|
|
2565
2565
|
summary: 'List custom currency associated entities',
|
|
2566
2566
|
description: 'Lists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.',
|
|
2567
|
-
stainlessPath: '(resource) v1.
|
|
2568
|
-
qualified: 'client.v1.
|
|
2567
|
+
stainlessPath: '(resource) v1.credits.custom_currencies > (method) list_associated_entities',
|
|
2568
|
+
qualified: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2569
2569
|
params: ['currencyId: string;'],
|
|
2570
2570
|
response: '{ data: { id: string; displayName: string; type: string; }[]; }',
|
|
2571
|
-
markdown: "## list_associated_entities\n\n`client.v1.
|
|
2571
|
+
markdown: "## list_associated_entities\n\n`client.v1.credits.customCurrencies.listAssociatedEntities(currencyId: string): { data: object[]; }`\n\n**get** `/api/v1/credits/custom-currencies/{currencyId}/associated-entities`\n\nLists the active plans and addons that reference a custom currency. Useful before archiving to inspect dependencies.\n\n### Parameters\n\n- `currencyId: string`\n\n### Returns\n\n- `{ data: { id: string; displayName: string; type: string; }[]; }`\n List of entities (plans or addons) that reference a custom currency\n\n - `data: { id: string; displayName: string; type: string; }[]`\n\n### Example\n\n```typescript\nimport Stigg from '@stigg/typescript';\n\nconst client = new Stigg();\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response);\n```",
|
|
2572
2572
|
perLanguage: {
|
|
2573
2573
|
typescript: {
|
|
2574
|
-
method: 'client.v1.
|
|
2575
|
-
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.
|
|
2574
|
+
method: 'client.v1.credits.customCurrencies.listAssociatedEntities',
|
|
2575
|
+
example: "import Stigg from '@stigg/typescript';\n\nconst client = new Stigg({\n apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.v1.credits.customCurrencies.listAssociatedEntities('currencyId');\n\nconsole.log(response.data);",
|
|
2576
2576
|
},
|
|
2577
2577
|
python: {
|
|
2578
|
-
method: 'v1.
|
|
2579
|
-
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.
|
|
2578
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2579
|
+
example: 'import os\nfrom stigg import Stigg\n\nclient = Stigg(\n api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.v1.credits.custom_currencies.list_associated_entities(\n "currencyId",\n)\nprint(response.data)',
|
|
2580
2580
|
},
|
|
2581
2581
|
java: {
|
|
2582
|
-
method: 'v1().
|
|
2583
|
-
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.
|
|
2582
|
+
method: 'v1().credits().customCurrencies().listAssociatedEntities',
|
|
2583
|
+
example: 'package io.stigg.example;\n\nimport io.stigg.client.StiggClient;\nimport io.stigg.client.okhttp.StiggOkHttpClient;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListAssociatedEntitiesParams;\nimport io.stigg.models.v1.credits.customcurrencies.CustomCurrencyListAssociatedEntitiesResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StiggClient client = StiggOkHttpClient.fromEnv();\n\n CustomCurrencyListAssociatedEntitiesResponse response = client.v1().credits().customCurrencies().listAssociatedEntities("currencyId");\n }\n}',
|
|
2584
2584
|
},
|
|
2585
2585
|
go: {
|
|
2586
|
-
method: 'client.V1.
|
|
2587
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.
|
|
2586
|
+
method: 'client.V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2587
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/stiggio/stigg-go"\n\t"github.com/stiggio/stigg-go/option"\n)\n\nfunc main() {\n\tclient := stigg.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.V1.Credits.CustomCurrencies.ListAssociatedEntities(context.TODO(), "currencyId")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Data)\n}\n',
|
|
2588
2588
|
},
|
|
2589
2589
|
ruby: {
|
|
2590
|
-
method: 'v1.
|
|
2591
|
-
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.
|
|
2590
|
+
method: 'v1.credits.custom_currencies.list_associated_entities',
|
|
2591
|
+
example: 'require "stigg"\n\nstigg = Stigg::Client.new(api_key: "My API Key")\n\nresponse = stigg.v1.credits.custom_currencies.list_associated_entities("currencyId")\n\nputs(response)',
|
|
2592
2592
|
},
|
|
2593
2593
|
cli: {
|
|
2594
2594
|
method: 'custom_currencies list_associated_entities',
|
|
2595
|
-
example: "stigg v1:
|
|
2595
|
+
example: "stigg v1:credits:custom-currencies list-associated-entities \\\n --api-key 'My API Key' \\\n --currency-id currencyId",
|
|
2596
2596
|
},
|
|
2597
2597
|
csharp: {
|
|
2598
|
-
method: 'V1.
|
|
2599
|
-
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.
|
|
2598
|
+
method: 'V1.Credits.CustomCurrencies.ListAssociatedEntities',
|
|
2599
|
+
example: 'CustomCurrencyListAssociatedEntitiesParams parameters = new()\n{\n CurrencyID = "currencyId"\n};\n\nvar response = await client.V1.Credits.CustomCurrencies.ListAssociatedEntities(parameters);\n\nConsole.WriteLine(response);',
|
|
2600
2600
|
},
|
|
2601
2601
|
http: {
|
|
2602
2602
|
example: 'curl https://api.stigg.io/api/v1/credits/custom-currencies/$CURRENCY_ID/associated-entities \\\n -H "X-API-KEY: $STIGG_API_KEY"',
|