src/endpoints/Region.php
<?php
namespace HnhDigital\LinodeApi;
/*
* This file is part of the PHP Linode API.
*
* (c) H&H|Digital <hello@hnh.digital>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use HnhDigital\LinodeApi\Foundation\Base;
/**
* This is the Region class.
*
* This file is automatically generated.
*
* @link https://developers.linode.com/api/v4#tag/Regions
*
* @author Rocco Howard <rocco@hnh.digital>
*/
class Region extends Base
{
/**
* Endpoint.
*
* @var string
*/
protected $endpoint = 'regions/%s';
/**
* Region Id.
*
* @var string
*/
protected $region_id;
/**
* This model is fillable.
*
* @var bool
*/
protected $fillable = true;
/**
* This model's method that provides the data to fill it.
*
* @var string
*/
protected $fill_method = 'get';
/**
* Constructor.
*
* @return void
*/
public function __construct($region_id, $fill = [])
{
$this->region_id = $region_id;
parent::__construct($region_id, $fill);
}
/**
* Returns a single Region.
*
* @link https://developers.linode.com/api/v4#operation/getRegion
*
* @return array
*/
public function get()
{
return $this->apiCall('get', '', [], ['auto-fill' => true]);
}
}