hnhdigital-os/php-linode-api

View on GitHub
src/endpoints/Account/Settings.php

Summary

Maintainability
A
1 hr
Test Coverage
<?php

namespace HnhDigital\LinodeApi\Account;

/*
 * 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 Settings class.
 *
 * This file is automatically generated.
 *
 * @link https://developers.linode.com/api/v4#tag/Account-Settings
 *
 * @author Rocco Howard <rocco@hnh.digital>
 */
class Settings extends Base
{
    /**
     * Endpoint.
     *
     * @var string
     */
    protected $endpoint = 'account/settings';

    /**
     * Constructor.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Returns information related to your Account settings: Managed service subscription, Longview subscription, and network
     * helper.
     *
     * @link https://developers.linode.com/api/v4#operation/getAccountSettings
     *
     * @return array
     */
    public function get()
    {
        return $this->apiCall('get', '', [], ['auto-fill' => true]);
    }

    /**
     * Updates your Account settings.
     *
     * @link https://developers.linode.com/api/v4#operation/updateAccountSettings
     *
     * @return void
     */
    public function update($optional = [])
    {
        return $this->apiCall('put', '', ['json' => $this->getDirty($optional)]);
    }
}