Files
wp-multisite-waas/inc/api/schemas/payment-update.php
David Stone d88e50df38 Prep Plugin for release on WordPress.org (#23)
* Update translation text domain
* Escape everything that should be escaped.
* Add nonce checks where needed.
* Sanitize all inputs.
* Apply Code style changes across the codebase.
* Correct many deprecation notices.
* Optimize load order of many filters.
* Add Proper Build script
* Use emojii flags
* Fix i18n deprecation  notice for translating too early
* Put all scripts in footer and load async
2025-04-14 11:36:46 -06:00

126 lines
4.3 KiB
PHP

<?php
/**
* Schema for payment@update.
*
* @package WP_Ultimo\API\Schemas
* @since 2.0.11
*/
// Exit if accessed directly
defined('ABSPATH') || exit;
use WP_Ultimo\Database\Payments\Payment_Status;
/**
* Schema for payment@update.
*
* @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 [
'customer_id' => [
'description' => __('The ID of the customer attached to this payment.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'membership_id' => [
'description' => __('The ID of the membership attached to this payment.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'parent_id' => [
'description' => __('The ID from another payment that this payment is related to.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'currency' => [
'description' => __("The currency of this payment. It's a 3-letter code. E.g. 'USD'.", 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'subtotal' => [
'description' => __('Value before taxes, discounts, fees and other changes.', 'wp-multisite-waas'),
'type' => 'number',
'required' => false,
],
'refund_total' => [
'description' => __('Total amount refunded.', 'wp-multisite-waas'),
'type' => 'number',
'required' => false,
],
'tax_total' => [
'description' => __('The amount, in currency, of the tax.', 'wp-multisite-waas'),
'type' => 'number',
'required' => false,
],
'discount_code' => [
'description' => __('Discount code used.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'total' => [
'description' => __('This takes into account fees, discounts and credits.', 'wp-multisite-waas'),
'type' => 'number',
'required' => false,
],
'status' => [
'description' => __("The payment status: Can be 'pending', 'completed', 'refunded', 'partially-refunded', 'partially-paid', 'failed', 'cancelled' or other values added by third-party add-ons.", 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
'enum' => Payment_Status::get_allowed_list(),
],
'gateway' => [
'description' => __('ID of the gateway being used on this payment.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'product_id' => [
'description' => __('The ID of the product of this payment.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'gateway_payment_id' => [
'description' => __('The ID of the payment on the gateway, if it exists.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'discount_total' => [
'description' => __('The total value of the discounts applied to this payment.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'invoice_number' => [
'description' => __('Sequential invoice number assigned to this payment.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'cancel_membership_on_refund' => [
'description' => __('Holds if we need to cancel the membership on refund.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
'date_created' => [
'description' => __('Model creation date.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'date_modified' => [
'description' => __('Model last modification date.', 'wp-multisite-waas'),
'type' => 'string',
'required' => false,
],
'migrated_from_id' => [
'description' => __('The ID of the original 1.X model that was used to generate this item on migration.', 'wp-multisite-waas'),
'type' => 'integer',
'required' => false,
],
'skip_validation' => [
'description' => __('Set true to have field information validation bypassed when saving this event.', 'wp-multisite-waas'),
'type' => 'boolean',
'required' => false,
],
];