pub struct Product {Show 19 fields
pub id: ProductId,
pub active: Option<bool>,
pub created: Option<Timestamp>,
pub default_price: Option<Expandable<Price>>,
pub deleted: bool,
pub description: Option<String>,
pub features: Option<Vec<ProductFeature>>,
pub images: Option<Vec<String>>,
pub livemode: Option<bool>,
pub metadata: Option<Metadata>,
pub name: Option<String>,
pub package_dimensions: Option<PackageDimensions>,
pub shippable: Option<bool>,
pub statement_descriptor: Option<String>,
pub tax_code: Option<Expandable<TaxCode>>,
pub type_: Option<ProductType>,
pub unit_label: Option<String>,
pub updated: Option<Timestamp>,
pub url: Option<String>,
}Expand description
The resource representing a Stripe “Product”.
For more details see https://stripe.com/docs/api/products/object
Fields§
§id: ProductIdUnique identifier for the object.
active: Option<bool>Whether the product is currently available for purchase.
created: Option<Timestamp>Time at which the object was created.
Measured in seconds since the Unix epoch.
default_price: Option<Expandable<Price>>The ID of the Price object that is the default price for this product.
deleted: bool§description: Option<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.
features: Option<Vec<ProductFeature>>A list of up to 15 features for this product.
These are displayed in pricing tables.
images: Option<Vec<String>>A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
livemode: Option<bool>Has the value true if the object exists in live mode or the value false if the object exists in test mode.
metadata: Option<Metadata>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.
name: Option<String>The product’s name, meant to be displayable to the customer.
package_dimensions: Option<PackageDimensions>The dimensions of this product for shipping purposes.
shippable: Option<bool>Whether this product is shipped (i.e., physical goods).
statement_descriptor: Option<String>Extra information about a product which will appear on your customer’s credit card statement.
In the case that multiple products are billed at once, the first statement descriptor will be used.
tax_code: Option<Expandable<TaxCode>>A tax code ID.
type_: Option<ProductType>The type of the product.
The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.
unit_label: Option<String>A label that represents units of this product.
When set, this will be included in customers’ receipts, invoices, Checkout, and the customer portal.
updated: Option<Timestamp>Time at which the object was last updated.
Measured in seconds since the Unix epoch.
url: Option<String>A URL of a publicly-accessible webpage for this product.
Implementations§
Source§impl Product
impl Product
Sourcepub fn list(
client: &Client,
params: &ListProducts<'_>,
) -> Response<List<Product>>
pub fn list( client: &Client, params: &ListProducts<'_>, ) -> Response<List<Product>>
Returns a list of your products.
The products are returned sorted by creation date, with the most recently created products appearing first.
Sourcepub fn create(client: &Client, params: CreateProduct<'_>) -> Response<Product>
pub fn create(client: &Client, params: CreateProduct<'_>) -> Response<Product>
Creates a new product object.
Sourcepub fn retrieve(
client: &Client,
id: &ProductId,
expand: &[&str],
) -> Response<Product>
pub fn retrieve( client: &Client, id: &ProductId, expand: &[&str], ) -> Response<Product>
Retrieves the details of an existing product.
Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
Source§impl Product
impl Product
Sourcepub fn search(
client: &Client,
params: ProductSearchParams<'_>,
) -> Response<SearchList<Product>>
Available on crate feature products only.
pub fn search( client: &Client, params: ProductSearchParams<'_>, ) -> Response<SearchList<Product>>
products only.Searches for a product.
For more details see https://stripe.com/docs/api/products/search.