pub struct ProductParams {
pub name: String,
pub recurring_interval: Option<RecurringInterval>,
pub prices: Vec<PriceParams>,
pub metadata: HashMap<String, String>,
pub description: Option<String>,
pub medias: Option<Vec<Uuid>>,
pub attached_custom_fields: Vec<AttachedCustomFieldParams>,
pub organization_id: Option<Uuid>,
}Fields§
§name: StringThe name of the product.
Minimum length: 3
recurring_interval: Option<RecurringInterval>The recurring interval of the product. If None, the product is a one-time purchase
prices: Vec<PriceParams>List of available prices for this product. It should contain at most one static price (fixed, custom or free), and any number of metered prices. Metered prices are not supported on one-time purchase products.
metadata: HashMap<String, String>Key-value object allowing you to store additional information.
description: Option<String>The description of the product.
medias: Option<Vec<Uuid>>List of file IDs. Each one must be on the same organization as the product, of type product_media and correctly uploaded.
attached_custom_fields: Vec<AttachedCustomFieldParams>List of custom fields to attach.
organization_id: Option<Uuid>The ID of the organization owning the product. Required unless you use an organization token.
Trait Implementations§
Source§impl Default for ProductParams
impl Default for ProductParams
Source§fn default() -> ProductParams
fn default() -> ProductParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProductParams
impl<'de> Deserialize<'de> for ProductParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProductParams
impl RefUnwindSafe for ProductParams
impl Send for ProductParams
impl Sync for ProductParams
impl Unpin for ProductParams
impl UnwindSafe for ProductParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more