import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; export declare class PromotionCode extends pulumi.CustomResource { /** * Get an existing PromotionCode resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PromotionCodeState, opts?: pulumi.CustomResourceOptions): PromotionCode; /** * Returns true if the given object is an instance of PromotionCode. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PromotionCode; /** * Whether the promotion code is currently active. */ readonly active: pulumi.Output; /** * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific * customer. If left blank, we will generate one automatically. */ readonly code: pulumi.Output; /** * The coupon for this promotion code. */ readonly coupon: pulumi.Output; /** * The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ readonly customer: pulumi.Output; /** * The timestamp at which this promotion code will expire. If the coupon has specified a redeems_by, then this value cannot * be after the coupon’s redeems_by. Expected format is RFC3339 */ readonly expiresAt: pulumi.Output; /** * A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a * max_redemptions, then this value cannot be greater than the coupon’s max_redemptions. */ readonly maxRedemptions: pulumi.Output; /** * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the * object in a structured format. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Settings that restrict the redemption of the promotion code. */ readonly restrictions: pulumi.Output; /** * Create a PromotionCode resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PromotionCodeArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PromotionCode resources. */ export interface PromotionCodeState { /** * Whether the promotion code is currently active. */ active?: pulumi.Input; /** * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific * customer. If left blank, we will generate one automatically. */ code?: pulumi.Input; /** * The coupon for this promotion code. */ coupon?: pulumi.Input; /** * The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ customer?: pulumi.Input; /** * The timestamp at which this promotion code will expire. If the coupon has specified a redeems_by, then this value cannot * be after the coupon’s redeems_by. Expected format is RFC3339 */ expiresAt?: pulumi.Input; /** * A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a * max_redemptions, then this value cannot be greater than the coupon’s max_redemptions. */ maxRedemptions?: pulumi.Input; /** * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the * object in a structured format. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Settings that restrict the redemption of the promotion code. */ restrictions?: pulumi.Input; } /** * The set of arguments for constructing a PromotionCode resource. */ export interface PromotionCodeArgs { /** * Whether the promotion code is currently active. */ active?: pulumi.Input; /** * The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific * customer. If left blank, we will generate one automatically. */ code?: pulumi.Input; /** * The coupon for this promotion code. */ coupon: pulumi.Input; /** * The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ customer?: pulumi.Input; /** * The timestamp at which this promotion code will expire. If the coupon has specified a redeems_by, then this value cannot * be after the coupon’s redeems_by. Expected format is RFC3339 */ expiresAt?: pulumi.Input; /** * A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a * max_redemptions, then this value cannot be greater than the coupon’s max_redemptions. */ maxRedemptions?: pulumi.Input; /** * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the * object in a structured format. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Settings that restrict the redemption of the promotion code. */ restrictions?: pulumi.Input; }