CreateProductInput
extends BaseProductInput
in package
Input type for creating a product.
Table of Contents
- $description : string|null
- $dimensions : DimensionsInput|null
- $manage_stock : bool|null
- $name : string
- $product_type : ProductType|null
- $regular_price : float|null
- $sale_price : float|null
- $short_description : string|null
- $sku : string|null
- $slug : string|null
- $status : ProductStatus|null
- $stock_quantity : int|null
- $provided_fields : array<string|int, mixed>
- Fields that were explicitly provided in the input.
- mark_provided() : void
- Mark a field as explicitly provided in the input.
- was_provided() : bool
- Check whether a field was explicitly provided in the input.
Properties
$description
public
string|null
$description
= null
$dimensions
public
DimensionsInput|null
$dimensions
= null
$manage_stock
public
bool|null
$manage_stock
= null
$name
public
string
$name
$product_type
public
ProductType|null
$product_type
= null
$regular_price
public
float|null
$regular_price
= null
$sale_price
public
float|null
$sale_price
= null
$short_description
public
string|null
$short_description
= null
$sku
public
string|null
$sku
= null
$slug
public
string|null
$slug
= null
$status
public
ProductStatus|null
$status
= null
$stock_quantity
public
int|null
$stock_quantity
= null
$provided_fields
Fields that were explicitly provided in the input.
protected
array<string|int, mixed>
$provided_fields
= array()
Using an underscore prefix to keep it invisible to the ApiBuilder (which only scans public properties for GraphQL fields).
Methods
mark_provided()
Mark a field as explicitly provided in the input.
public
mark_provided(string $field) : void
Parameters
- $field : string
-
The field name.
Return values
void —was_provided()
Check whether a field was explicitly provided in the input.
public
was_provided(string $field) : bool
Parameters
- $field : string
-
The field name.
