assets
data
dependencies
inc
admin-pages
api
schemas
broadcast-create.php
broadcast-update.php
checkout-form-create.php
checkout-form-update.php
customer-create.php
customer-update.php
discount-code-create.php
discount-code-update.php
domain-create.php
domain-update.php
email-create.php
email-update.php
event-create.php
event-update.php
membership-create.php
membership-update.php
payment-create.php
payment-update.php
product-create.php
product-update.php
site-create.php
site-update.php
webhook-create.php
webhook-update.php
class-register-endpoint.php
trait-rest-api.php
trait-wp-cli.php
builders
checkout
compat
contracts
country
database
debug
deprecated
development
domain-mapping
duplication
exception
functions
gateways
helpers
installers
integrations
internal
invoices
limitations
limits
list-tables
loaders
managers
mercator
models
next
objects
site-templates
sso
tax
traits
ui
updater
class-admin-notices.php
class-admin-themes-compatibility.php
class-ajax.php
class-api.php
class-async-calls.php
class-autoloader.php
class-cron.php
class-current.php
class-dashboard-statistics.php
class-dashboard-widgets.php
class-documentation.php
class-domain-mapping.php
class-faker.php
class-geolocation.php
class-helper.php
class-hooks.php
class-license.php
class-light-ajax.php
class-logger.php
class-maintenance-mode.php
class-newsletter.php
class-requirements.php
class-scripts.php
class-session-cookie.php
class-settings.php
class-sunrise.php
class-user-switching.php
class-views.php
class-whitelabel.php
class-wp-ultimo.php
lang
views
.gitignore
LICENSE
autoload.php
composer.json
constants.php
loco.xml
readme.txt
sunrise.php
uninstall.php
wp-multisite-waas.php
200 lines
6.5 KiB
PHP
200 lines
6.5 KiB
PHP
<?php
|
|
/**
|
|
* Schema for product@create.
|
|
*
|
|
* @package WP_Ultimo\API\Schemas
|
|
* @since 2.0.11
|
|
*/
|
|
|
|
// Exit if accessed directly
|
|
defined('ABSPATH') || exit;
|
|
|
|
/**
|
|
* Schema for product@create.
|
|
*
|
|
* @since 2.0.11
|
|
* @internal last-generated in 2022-12
|
|
* @generated class generated by our build scripts, do not change!
|
|
*
|
|
* @since 2.0.11
|
|
*/
|
|
return array(
|
|
'featured_image_id' => array(
|
|
'description' => __('The ID of the feature image of the product.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'slug' => array(
|
|
'description' => __('The product slug. It needs to be unique and preferably make it clear what it is about. Example: my_new_product.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => true,
|
|
),
|
|
'name' => array(
|
|
'description' => __('Your product name, which is used as product title as well.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'description' => array(
|
|
'description' => __('A description for the product, usually a short text.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'currency' => array(
|
|
'description' => __("The currency that this product accepts. It's a 3-letter code. E.g. 'USD'.", 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => true,
|
|
),
|
|
'pricing_type' => array(
|
|
'description' => __("The pricing type can be 'free', 'paid' or 'contact_us'.", 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => true,
|
|
'enum' => array(
|
|
'free',
|
|
'paid',
|
|
'contact_us',
|
|
),
|
|
),
|
|
'trial_duration' => array(
|
|
'description' => __('The duration of the trial period of this product, if the product has one.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'trial_duration_unit' => array(
|
|
'description' => __('The unit of the trial duration amount. Can be day, week, month or year.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
'enum' => array(
|
|
'day',
|
|
'week',
|
|
'month',
|
|
'year',
|
|
),
|
|
),
|
|
'duration' => array(
|
|
'description' => __('Time interval between charges.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'duration_unit' => array(
|
|
'description' => __('Time interval unit between charges.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
'enum' => array(
|
|
'day',
|
|
'month',
|
|
'week',
|
|
'year',
|
|
),
|
|
),
|
|
'amount' => array(
|
|
'description' => __('The value of this product. E.g. 19.99.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'setup_fee' => array(
|
|
'description' => __('The setup fee value, if the product has one. E.g. 159.99.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'active' => array(
|
|
'description' => __('Set this product as active (true), which means available to be used, or inactive (false).', 'wp-ultimo'),
|
|
'type' => 'boolean',
|
|
'required' => false,
|
|
),
|
|
'type' => array(
|
|
'description' => __("The default product types are 'product', 'service' and 'package'. More types can be add using the product type filter.", 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => true,
|
|
'enum' => array(
|
|
'plan',
|
|
'service',
|
|
'package',
|
|
),
|
|
),
|
|
'parent_id' => array(
|
|
'description' => __('The ID from another Product that this product is related to.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'recurring' => array(
|
|
'description' => __('Set this product as a recurring one (true), which means the customer paid a defined amount each period of time, or not recurring (false).', 'wp-ultimo'),
|
|
'type' => 'boolean',
|
|
'required' => false,
|
|
),
|
|
'billing_cycles' => array(
|
|
'description' => __('The number of times we should charge this product.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'date_created' => array(
|
|
'description' => __('Date when this was created.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'date_modified' => array(
|
|
'description' => __('Date when this was last modified.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'taxable' => array(
|
|
'description' => __('Set this product as a taxable one (true), which means tax rules are applied to, or not taxable (false).', 'wp-ultimo'),
|
|
'type' => 'boolean',
|
|
'required' => false,
|
|
),
|
|
'tax_category' => array(
|
|
'description' => __('Category of taxes applied to this product. You need to set this if taxable is set to true.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'contact_us_label' => array(
|
|
'description' => __("If the product is the 'contact_us' type, it will need a label for the contact us button.", 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'contact_us_link' => array(
|
|
'description' => __('The url where the contact us button will lead to.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'feature_list' => array(
|
|
'description' => __('A list (array) of features of the product.', 'wp-ultimo'),
|
|
'type' => 'array',
|
|
'required' => false,
|
|
),
|
|
'customer_role' => array(
|
|
'description' => __('The customer role of this product.', 'wp-ultimo'),
|
|
'type' => 'string',
|
|
'required' => false,
|
|
),
|
|
'available_addons' => array(
|
|
'description' => __('The available addons of this product.', 'wp-ultimo'),
|
|
'type' => 'array',
|
|
'required' => false,
|
|
),
|
|
'group' => array(
|
|
'description' => __('The group of this product, if has any.', 'wp-ultimo'),
|
|
'type' => 'array',
|
|
'required' => false,
|
|
),
|
|
'legacy_options' => array(
|
|
'description' => __('If the legacy options are enabled.', 'wp-ultimo'),
|
|
'type' => 'boolean',
|
|
'required' => false,
|
|
),
|
|
'migrated_from_id' => array(
|
|
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-ultimo'),
|
|
'type' => 'integer',
|
|
'required' => false,
|
|
),
|
|
'skip_validation' => array(
|
|
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-ultimo'),
|
|
'type' => 'boolean',
|
|
'required' => false,
|
|
),
|
|
'featured_plan' => array(
|
|
'description' => __('Feature list for pricing tables.', 'wp-ultimo'),
|
|
'type' => 'array',
|
|
'required' => false,
|
|
),
|
|
);
|