Skip to content
This repository was archived by the owner on Oct 4, 2019. It is now read-only.

Commit fa2f0e3

Browse files
author
Justin Shreve
committed
Initial commit of namespaced v3 API endpoints & tests.
0 parents  commit fa2f0e3

File tree

46 files changed

+6338
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6338
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# wc-api-dev
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* REST API Coupons controller
4+
*
5+
* Handles requests to the /coupons endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Coupons controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Coupons_Controller extends WC_REST_Coupons_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* REST API Customer Downloads controller
4+
*
5+
* Handles requests to the /customers/<customer_id>/downloads endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Customers controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Customer_Downloads_Controller extends WC_REST_Customer_Downloads_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* REST API Customers controller
4+
*
5+
* Handles requests to the /customers endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Customers controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Customers_Controller extends WC_REST_Customers_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* REST API Order Notes controller
4+
*
5+
* Handles requests to the /orders/<order_id>/notes endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Order Notes controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Order_Notes_Controller extends WC_REST_Order_Notes_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* REST API Order Refunds controller
4+
*
5+
* Handles requests to the /orders/<order_id>/refunds endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Order Refunds controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Order_Refunds_Controller extends WC_REST_DEV_Orders_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* REST API Orders controller
4+
*
5+
* Handles requests to the /orders endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Orders controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Orders_Controller extends WC_REST_Orders_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
31+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* REST API WC Payment gateways controller
4+
*
5+
* Handles requests to the /payment_gateways endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 3.0.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* @package WooCommerce/API
19+
*/
20+
class WC_REST_Dev_Payment_Gateways_Controller extends WC_REST_Payment_Gateways_Controller {
21+
22+
/**
23+
* Endpoint namespace.
24+
*
25+
* @var string
26+
*/
27+
protected $namespace = 'wc/v3';
28+
29+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* REST API Product Attribute Terms controller
4+
*
5+
* Handles requests to the products/attributes/<attribute_id>/terms endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Product Attribute Terms controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Product_Attribute_Terms_Controller extends WC_REST_Product_Attribute_Terms_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* REST API Product Attributes controller
4+
*
5+
* Handles requests to the products/attributes endpoint.
6+
*
7+
* @author WooThemes
8+
* @category API
9+
* @package WooCommerce/API
10+
* @since 2.6.0
11+
*/
12+
13+
if ( ! defined( 'ABSPATH' ) ) {
14+
exit;
15+
}
16+
17+
/**
18+
* REST API Product Attributes controller class.
19+
*
20+
* @package WooCommerce/API
21+
*/
22+
class WC_REST_Dev_Product_Attributes_Controller extends WC_REST_Product_Attributes_Controller {
23+
24+
/**
25+
* Endpoint namespace.
26+
*
27+
* @var string
28+
*/
29+
protected $namespace = 'wc/v3';
30+
}

0 commit comments

Comments
 (0)