Update customers report endpoint item schema to match (visual) table designs.

This commit is contained in:
Jeff Stieler 2018-12-19 10:14:55 -07:00
parent 56beada220
commit b9f0d9fe5f
1 changed files with 46 additions and 4 deletions

View File

@ -154,18 +154,60 @@ class WC_Admin_REST_Reports_Customers_Controller extends WC_REST_Reports_Control
'title' => 'report_customers',
'type' => 'object',
'properties' => array(
'id' => array(
'description' => __( 'ID.', 'wc-admin' ),
'customer_id' => array(
'description' => __( 'Customer ID.', 'wc-admin' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'customer_id' => array(
'description' => __( 'Customer ID.', 'wc-admin' ),
'user_id' => array(
'description' => __( 'User ID.', 'wc-admin' ),
'type' => 'integer',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'name' => array(
'description' => __( 'Name.', 'wc-admin' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'username' => array(
'description' => __( 'Username.', 'wc-admin' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'country' => array(
'description' => __( 'Country.', 'wc-admin' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'city' => array(
'description' => __( 'City.', 'wc-admin' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'postcode' => array(
'description' => __( 'Postal code.', 'wc-admin' ),
'type' => 'string',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'date_registered' => array(
'description' => __( 'Date registered.', 'wc-admin' ),
'type' => 'date-time',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'date_registered_gmt' => array(
'description' => __( 'Date registered GMT.', 'wc-admin' ),
'type' => 'date-time',
'context' => array( 'view', 'edit' ),
'readonly' => true,
),
'date_last_active' => array(
'description' => __( 'Date last active.', 'wc-admin' ),
'type' => 'date-time',