CreateCouponInput
in package
Uses
TracksProvidedFields
Input type for creating a coupon.
Table of Contents
- $amount : float|null
- $code : string
- $date_expires : string|null
- $description : string|null
- $discount_type : DiscountType|null
- $email_restrictions : array<string|int, mixed>|null
- $exclude_sale_items : bool|null
- $excluded_product_categories : array<string|int, mixed>|null
- $excluded_product_ids : array<string|int, mixed>|null
- $free_shipping : bool|null
- $individual_use : bool|null
- $limit_usage_to_x_items : int|null
- $maximum_amount : float|null
- $minimum_amount : float|null
- $product_categories : array<string|int, mixed>|null
- $product_ids : array<string|int, mixed>|null
- $status : CouponStatus|null
- $usage_limit : int|null
- $usage_limit_per_user : 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
$amount
public
float|null
$amount
= null
$code
public
string
$code
$date_expires
public
string|null
$date_expires
= null
$description
public
string|null
$description
= null
$discount_type
public
DiscountType|null
$discount_type
= null
$email_restrictions
public
array<string|int, mixed>|null
$email_restrictions
= null
$exclude_sale_items
public
bool|null
$exclude_sale_items
= null
$excluded_product_categories
public
array<string|int, mixed>|null
$excluded_product_categories
= null
$excluded_product_ids
public
array<string|int, mixed>|null
$excluded_product_ids
= null
$free_shipping
public
bool|null
$free_shipping
= null
$individual_use
public
bool|null
$individual_use
= null
$limit_usage_to_x_items
public
int|null
$limit_usage_to_x_items
= null
$maximum_amount
public
float|null
$maximum_amount
= null
$minimum_amount
public
float|null
$minimum_amount
= null
$product_categories
public
array<string|int, mixed>|null
$product_categories
= null
$product_ids
public
array<string|int, mixed>|null
$product_ids
= null
$status
public
CouponStatus|null
$status
= null
$usage_limit
public
int|null
$usage_limit
= null
$usage_limit_per_user
public
int|null
$usage_limit_per_user
= 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.
