somosyampi/anymarket-php-sdk

View on GitHub
src/Yampi/Anymarket/Services/Environment.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Yampi\Anymarket\Services;

use Yampi\Anymarket\Contracts\EnvironmentInterface;

class Environment implements EnvironmentInterface
{
    protected $endpoint;

    public function __construct($endpoint)
    {
        $this->endpoint = $endpoint;
    }

    public function getEndpoint()
    {
        return $this->endpoint;
    }

    public static function sandbox()
    {
        return new self('http://sandbox-api.anymarket.com.br/v2');
    }

    public static function production()
    {
        return new self('http://api.anymarket.com.br/v2');
    }
}