<?php
/**
 * REST API Initialization
 *
 * @package Invizo\SubscriptionsLite\REST_API
 */

namespace Invizo\SubscriptionsLite\REST_API;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class REST_Init {

	public static function init() {
		add_action( 'rest_api_init', array( __CLASS__, 'register_routes' ) );
	}

	public static function register_routes() {
		$subs_controller     = new Subscriptions_Controller();
		$subs_controller->register_routes();

		$plans_controller = new Plans_Controller();
		$plans_controller->register_routes();

		$settings_controller = new Settings_Controller();
		$settings_controller->register_routes();
	}
}
