<?php


class Environment 
{
    private $api;

    private $apiData;

    private function __construct($api, $apiData)
    {
        $this->api = $api;
        $this->apiData = $apiData;
    }

    public static function sandbox()
    {
        $api = 'https://homologacao.clearsale.com.br/api/';
        $apiData = 'https://homologacao.clearsale.com.br/apidata/ ';
   
        return new Environment($api, $apiData);
    }

    public static function production()
    {
        $api = 'https://api.clearsale.com.br/';
        $apiData = 'https://apidata.clearsale.com.br/';
        
        return new Environment($api, $apiData);
    }

    /**
     * Gets the environment's Api URL
     *
     * @return the Api URL
     */
    public function getApiUrl()
    {
        return $this->api;
    }

    /**
     * Gets the environment's Api Data URL
     *
     * @return the Api Data URL
     */
    public function getApiDataURL()
    {
        return $this->apiData;
    }
}