for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the PayBreak/paybreak-sdk-php package.
*
* (c) PayBreak <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PayBreak\Sdk\Gateways;
use PayBreak\Sdk\SdkException;
use PayBreak\Sdk\Entities\IpsEntity;
/**
* Class IpsGateway
* @author EB
* @package Paybreak\Sdk\Gateways
class IpsGateway extends AbstractGateway
{
* @param string $token
* @return IpsEntity[]
* @throws SdkException
public function listIpAddresses($token)
$response = $this->fetchDocument('/v4/ip-addresses', $token, 'ips');
$rtn = [];
foreach ($response as $ip) {
$rtn[] = IpsEntity::make($ip);
}
return $rtn;
* @param $ip
* @return array
public function storeIpAddress($token, $ip)
return $this->postDocument('/v4/ip-addresses', ['ip' => $ip], $token, 'ips');
* @param int $id
public function deleteIpAddress($token, $id)
return $this->deleteDocument('/v4/ip-addresses/' . $id, $token, 'ips');