// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as stripe from "pulumi-stripe"; * * // The product with more fields filled * const product = new stripe.Product("product", { * description: "fantastic product", * unitLabel: "piece", * url: "https://www.terraform.io", * }); * ``` * * ## Import * * ```sh * $ pulumi import stripe:index/product:Product product * ``` */ export class Product extends pulumi.CustomResource { /** * Get an existing Product 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. */ public static get(name: string, id: pulumi.Input, state?: ProductState, opts?: pulumi.CustomResourceOptions): Product { return new Product(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'stripe:index/product:Product'; /** * Returns true if the given object is an instance of Product. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is Product { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Product.__pulumiType; } /** * Bool. Whether the product is currently available for purchase. Defaults to `true`. */ public readonly active!: pulumi.Output; /** * String. The product’s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ public readonly description!: pulumi.Output; /** * List(String). A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ public readonly images!: pulumi.Output; /** * List(String). A list of up to 15 marketing features for this product. These are displayed in pricing tables. */ public readonly marketingFeatures!: pulumi.Output; /** * Map(String). 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. */ public readonly metadata!: pulumi.Output<{[key: string]: string} | undefined>; /** * String. The product’s name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ public readonly name!: pulumi.Output; /** * Map(Float). The dimensions of this product for shipping purposes. When used these fields are required: `height`,`length`,`width` and `weight`; the precision is 2 decimal places. */ public readonly packageDimensions!: pulumi.Output<{[key: string]: number} | undefined>; /** * String. The bespoke unique identifier for the object. */ public readonly productId!: pulumi.Output; /** * Bool. Whether this product is shipped (i.e., physical goods). */ public readonly shippable!: pulumi.Output; /** * String. An arbitrary string to be displayed on your customer’s credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`,` >`, `\`, `"`, `’` characters, and will appear on your customer’s statement in capital letters. Non-ASCII characters are automatically stripped. It must contain at least one letter. */ public readonly statementDescriptor!: pulumi.Output; /** * String. A tax code ID. Supported values are listed in the TaxCode resource and at https://stripe.com/docs/tax/tax-categories. */ public readonly taxCode!: pulumi.Output; /** * String. A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ public readonly unitLabel!: pulumi.Output; /** * String. A URL of a publicly-accessible webpage for this product. */ public readonly url!: pulumi.Output; /** * Create a Product 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?: ProductArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ProductArgs | ProductState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ProductState | undefined; resourceInputs["active"] = state ? state.active : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["images"] = state ? state.images : undefined; resourceInputs["marketingFeatures"] = state ? state.marketingFeatures : undefined; resourceInputs["metadata"] = state ? state.metadata : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["packageDimensions"] = state ? state.packageDimensions : undefined; resourceInputs["productId"] = state ? state.productId : undefined; resourceInputs["shippable"] = state ? state.shippable : undefined; resourceInputs["statementDescriptor"] = state ? state.statementDescriptor : undefined; resourceInputs["taxCode"] = state ? state.taxCode : undefined; resourceInputs["unitLabel"] = state ? state.unitLabel : undefined; resourceInputs["url"] = state ? state.url : undefined; } else { const args = argsOrState as ProductArgs | undefined; resourceInputs["active"] = args ? args.active : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["images"] = args ? args.images : undefined; resourceInputs["marketingFeatures"] = args ? args.marketingFeatures : undefined; resourceInputs["metadata"] = args ? args.metadata : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["packageDimensions"] = args ? args.packageDimensions : undefined; resourceInputs["productId"] = args ? args.productId : undefined; resourceInputs["shippable"] = args ? args.shippable : undefined; resourceInputs["statementDescriptor"] = args ? args.statementDescriptor : undefined; resourceInputs["taxCode"] = args ? args.taxCode : undefined; resourceInputs["unitLabel"] = args ? args.unitLabel : undefined; resourceInputs["url"] = args ? args.url : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Product.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering Product resources. */ export interface ProductState { /** * Bool. Whether the product is currently available for purchase. Defaults to `true`. */ active?: pulumi.Input; /** * String. The product’s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: pulumi.Input; /** * List(String). A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ images?: pulumi.Input[]>; /** * List(String). A list of up to 15 marketing features for this product. These are displayed in pricing tables. */ marketingFeatures?: pulumi.Input[]>; /** * Map(String). 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}>; /** * String. The product’s name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ name?: pulumi.Input; /** * Map(Float). The dimensions of this product for shipping purposes. When used these fields are required: `height`,`length`,`width` and `weight`; the precision is 2 decimal places. */ packageDimensions?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * String. The bespoke unique identifier for the object. */ productId?: pulumi.Input; /** * Bool. Whether this product is shipped (i.e., physical goods). */ shippable?: pulumi.Input; /** * String. An arbitrary string to be displayed on your customer’s credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`,` >`, `\`, `"`, `’` characters, and will appear on your customer’s statement in capital letters. Non-ASCII characters are automatically stripped. It must contain at least one letter. */ statementDescriptor?: pulumi.Input; /** * String. A tax code ID. Supported values are listed in the TaxCode resource and at https://stripe.com/docs/tax/tax-categories. */ taxCode?: pulumi.Input; /** * String. A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unitLabel?: pulumi.Input; /** * String. A URL of a publicly-accessible webpage for this product. */ url?: pulumi.Input; } /** * The set of arguments for constructing a Product resource. */ export interface ProductArgs { /** * Bool. Whether the product is currently available for purchase. Defaults to `true`. */ active?: pulumi.Input; /** * String. The product’s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: pulumi.Input; /** * List(String). A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ images?: pulumi.Input[]>; /** * List(String). A list of up to 15 marketing features for this product. These are displayed in pricing tables. */ marketingFeatures?: pulumi.Input[]>; /** * Map(String). 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}>; /** * String. The product’s name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ name?: pulumi.Input; /** * Map(Float). The dimensions of this product for shipping purposes. When used these fields are required: `height`,`length`,`width` and `weight`; the precision is 2 decimal places. */ packageDimensions?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * String. The bespoke unique identifier for the object. */ productId?: pulumi.Input; /** * Bool. Whether this product is shipped (i.e., physical goods). */ shippable?: pulumi.Input; /** * String. An arbitrary string to be displayed on your customer’s credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. This may be up to 22 characters. The statement description may not include `<`,` >`, `\`, `"`, `’` characters, and will appear on your customer’s statement in capital letters. Non-ASCII characters are automatically stripped. It must contain at least one letter. */ statementDescriptor?: pulumi.Input; /** * String. A tax code ID. Supported values are listed in the TaxCode resource and at https://stripe.com/docs/tax/tax-categories. */ taxCode?: pulumi.Input; /** * String. A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unitLabel?: pulumi.Input; /** * String. A URL of a publicly-accessible webpage for this product. */ url?: pulumi.Input; }