[−][src]Struct stripe::CreateSku
The parameters for Sku::create
.
Fields
active: Option<bool>
Whether the SKU is available for purchase.
Default to true
.
attributes: Option<Metadata>
A dictionary of attributes and values for the attributes defined by the product.
If, for example, a product's attributes are ["size", "gender"]
, a valid SKU has the following dictionary of attributes: {"size": "Medium", "gender": "Unisex"}
.
currency: Currency
Three-letter ISO currency code, in lowercase.
Must be a supported currency.
expand: &'a [&'a str]
Specifies which fields in the response should be expanded.
id: Option<&'a str>
The identifier for the SKU.
Must be unique. If not provided, an identifier will be randomly generated.
image: Option<&'a str>
The URL of an image for this SKU, meant to be displayable to the customer.
inventory: Option<Inventory>
Description of the SKU's inventory.
metadata: Option<Metadata>
A set of key-value pairs that you can attach to a SKU object.
It can be useful for storing additional information about the SKU in a structured format.
package_dimensions: Option<PackageDimensions>
The dimensions of this SKU for shipping purposes.
price: i64
The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
product: IdOrCreate<'a, CreateProduct<'a>>
The ID of the product this SKU is associated with.
Must be a product with type good
.
Implementations
impl<'a> CreateSku<'a>
[src]
pub fn new(
currency: Currency,
inventory: Option<Inventory>,
price: i64,
product: IdOrCreate<'a, CreateProduct<'a>>
) -> Self
[src]
currency: Currency,
inventory: Option<Inventory>,
price: i64,
product: IdOrCreate<'a, CreateProduct<'a>>
) -> Self
Trait Implementations
impl<'a> Clone for CreateSku<'a>
[src]
impl<'a> Debug for CreateSku<'a>
[src]
impl<'a> Serialize for CreateSku<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for CreateSku<'a>
impl<'a> Send for CreateSku<'a>
impl<'a> Sync for CreateSku<'a>
impl<'a> Unpin for CreateSku<'a>
impl<'a> UnwindSafe for CreateSku<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,