for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Codexshaper\WooCommerce\Models;
use Codexshaper\WooCommerce\Facades\Query;
use Codexshaper\WooCommerce\Traits\QueryBuilderTrait;
class Report extends BaseModel
{
use QueryBuilderTrait;
protected $endpoint = 'reports';
/**
* Retrieve all sales.
*
* @param array $options
* @return array
*/
protected function sales($options = [])
return Query::init()
->setEndpoint('reports/sales')
->all($options);
}
* Retrieve all top sellers.
protected function topSellers($options = [])
->setEndpoint('reports/top_sellers')
* Retrieve all coupons.
protected function coupons($options = [])
->setEndpoint('reports/coupons/totals')
* Retrieve all customers.
protected function customers($options = [])
->setEndpoint('reports/customers/totals')
* Retrieve all orders.
protected function orders($options = [])
->setEndpoint('reports/orders/totals')
* Retrieve all products.
protected function products($options = [])
->setEndpoint('reports/products/totals')
* Retrieve all reviews.
protected function reviews($options = [])
->setEndpoint('reports/reviews/totals')