import type { ApiErrorInfo } from '../../../../types/command.types.js'; import { CcApiSimpleCommand } from '../../lib/cc-api-command.js'; import type { ActivateCouponCommandInput, ActivateCouponCommandOutput } from './activate-coupon-command.types.js'; /** * The error codes this command can produce, to compare against `error.code`. * * - `NOT_FOUND`: The coupon doesn't exist * - `NOT_VALID_YET`: The coupon is not valid yet * - `NO_LONGER_VALID`: The coupon is no longer valid * - `USED_TOO_MANY_TIMES`: The coupon has been used too many times * - `CURRENCY_MISMATCH`: The currency of the coupon doesn't match the currency of the owner * - `ALREADY_ACTIVATED`: The coupon was already activated */ export declare const ACTIVATE_COUPON_ERROR_CODES: { readonly NOT_FOUND: 'clever.credits.coupon.not-found'; readonly NOT_VALID_YET: 'clever.credits.coupon.not-valid-yet'; readonly NO_LONGER_VALID: 'clever.credits.coupon.no-longer-valid'; readonly USED_TOO_MANY_TIMES: 'clever.credits.coupon.used-too-many-times'; readonly CURRENCY_MISMATCH: 'clever.credits.coupon.currency-mismatch'; readonly ALREADY_ACTIVATED: 'clever.credits.coupon.already-activated'; }; export type ActivateCouponErrorCode = (typeof ACTIVATE_COUPON_ERROR_CODES)[keyof typeof ACTIVATE_COUPON_ERROR_CODES]; /** * Activates a coupon * * Common error codes: see {@link ACTIVATE_COUPON_ERROR_CODES} * * @endpoint [POST] /v4/billing/organisations/:XXX/applied-coupons * @group Credits * @version 4 */ export declare class ActivateCouponCommand extends CcApiSimpleCommand { toRequestParams(params: ActivateCouponCommandInput): Partial; transformCommandOutput(response: unknown): ActivateCouponCommandOutput; transformErrorCode({ code }: ApiErrorInfo): ActivateCouponErrorCode; isIdempotent(): boolean; } //# sourceMappingURL=activate-coupon-command.d.ts.map