@param string $gatewayAccountId
@param string $downtimeId
@param array|ArrayObject $params

@return GatewayAccountDowntime
176301
public function load($gatewayAccountId, $downtimeId, $params = [])
    {
        return $this->client()->get(
            'gateway-accounts/{gatewayAccountId}/downtime-schedules/{downtimeId}',
            ['downtimeId' => $downtimeId, 'gatewayAccountId' => $gatewayAccountId] + (array) $params
        );
    }
1328447
public function getServiceDataDatabase(array $params) {

        $dataPostgresql = new \Cityware\Monitoring\Models\Services\DataPostgreSql($params);

        $databases = $dataPostgresql->getDataPgSqlDatabaseStatus();

        $return = Array();

        foreach ($databases as $key => $value) {

            $hitRatio = (($value['blks_hit'] + $value['blks_read']) > 0) ? (($value['blks_hit'] * 100) / ($value['blks_hit'] + $value['blks_read'])) : 0;


            $return[$key]['nam_database'] = $value['datname'];
            $return[$key]['des_hash'] = hash('crc32b', $value['datname']);
            $return[$key]['num_datid'] = $value['datid'];
            $return[$key]['num_commit'] = $value['xact_commit'];
            $return[$key]['num_rollback'] = $value['xact_rollback'];
            $return[$key]['num_blks_read'] = $value['blks_read'];
            $return[$key]['num_blks_hit'] = $value['blks_hit'];
            $return[$key]['num_database_size'] = $value['db_size'];
            $return[$key]['num_database_age'] = $value['db_age'];
            $return[$key]['num_connection_ratio'] = $value['connection_ratio'];
            $return[$key]['num_transactions_per_second'] = $value['transactions_per_second'];
            $return[$key]['num_hit_ratio'] = $hitRatio;
            $return[$key]['num_tup_returned'] = $value['tup_returned'];
            $return[$key]['num_tup_fetched'] = $value['tup_fetched'];
            $return[$key]['num_tup_inserted'] = $value['tup_inserted'];
            $return[$key]['num_tup_updated'] = $value['tup_updated'];
            $return[$key]['num_tup_deleted'] = $value['tup_deleted'];
            $return[$key]['num_backends'] = $value['numbackends'];
            $return[$key]['num_total_connections'] = $value['total_connections'];
            $return[$key]['num_total_seq_scan'] = $value['seq_scan'];
            $return[$key]['num_total_idx_scan'] = $value['idx_scan'];
            $return[$key]['num_total_autovacuum'] = $value['autovacuum_count'];
            $return[$key]['num_total_autoanalyze'] = $value['autoanalyze_count'];
        }

        return $return;
    }
134187
def get_api_gateway_resource(name):
    """"""
    client = boto3.client('apigateway', region_name=PRIMARY_REGION)
    matches = [x for x in client.get_rest_apis().get('items', list())
               if x['name'] == API_GATEWAY]
    match = matches.pop()
    resources = client.get_resources(restApiId=match.get('id'))
    resource_id = None
    for item in resources.get('items', list()):
        if item.get('pathPart', '/') != name:
            continue
        resource_id = item['id']
    return resource_id
641570
@Override
    protected UserAccount getFallback() {
        /*
         * first 3 come from the HttpCookie
         * next 3 are stubbed defaults
         */
        return new UserAccount(userCookie.userId, userCookie.name, userCookie.accountType, true, true, true);
    }
666493
public function addOAuthProvider($params = array())
    {
        $params = $this->checkFilterParams($params, array('type', 'provider_consumer_key', 'provider_consumer_secret'),
            array('type', 'provider_consumer_key', 'provider_consumer_secret'));
        if ($params === false) {
            throw new \InvalidArgumentException("params array contains invalid parameters or misses required parameters");
        }

        return $this->lastRequest->post(null, 'oauth_providers', $params);
    }
1127301
public function downtime(string $startedAt, string $endedAt)
    {
        return $this->ohDear->downtime($this->id, $startedAt, $endedAt);
    }
909383
public static function get(
        int $monetaryAccountSavingsId,
        array $customHeaders = []
    ): BunqResponseMonetaryAccountSavings {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->get(
            vsprintf(
                self::ENDPOINT_URL_READ,
                [static::determineUserId(), $monetaryAccountSavingsId]
            ),
            [],
            $customHeaders
        );

        return BunqResponseMonetaryAccountSavings::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_GET)
        );
    }
1055976
public static function getGateway()
    {
        $gatewayClass = self::$gatewayClass;

        return new $gatewayClass(
            array(
                // some databases don't need a hostname (oracle for instance)
                "host" => defined( "CLUSTER_STORAGE_HOST" ) ? CLUSTER_STORAGE_HOST : null,
                "port" => defined( "CLUSTER_STORAGE_PORT" ) ? CLUSTER_STORAGE_PORT : null,
                "user" => CLUSTER_STORAGE_USER,
                "password" => CLUSTER_STORAGE_PASS,
                "name" => CLUSTER_STORAGE_DB,
                "charset" => CLUSTER_STORAGE_CHARSET,
            )
        );
    }
1013034
public static function getClientIdByUid($uid)
    {
        $gateway_data             = GatewayProtocol::$empty;
        $gateway_data['cmd']      = GatewayProtocol::CMD_GET_CLIENT_ID_BY_UID;
        $gateway_data['ext_data'] = $uid;
        $client_list              = array();
        $all_buffer_array         = self::getBufferFromAllGateway($gateway_data);
        foreach ($all_buffer_array as $local_ip => $buffer_array) {
            foreach ($buffer_array as $local_port => $connection_id_array) {
                if ($connection_id_array) {
                    foreach ($connection_id_array as $connection_id) {
                        $client_list[] = Context::addressToClientId($local_ip, $local_port, $connection_id);
                    }
                }
            }
        }
        return $client_list;
    }
354399
public function getDomainSummaryStatistics($options = array())
    {
        list($config, $startTime, $endTime) = $this->parseOptions(
            $options,
            'config',
            'startTime',
            'endTime'
        );

        if (empty($startTime)) {
            throw new BceClientException("The query parameter startTime "
                . "should NOT be null or empty string");
        }
        if (empty($endTime)) {
            throw new BceClientException("The query parameter endTime "
                . "should NOT be null or empty string");
        }

        $params = array(
            'startTime' => $startTime,
            'endTime' => $endTime,
        );

        return $this->sendRequest(
            HttpMethod::GET,
            array(
                'config' => $config,
                'params' => $params,
            ),
            "/statistics/domain/summary"
        );
    }
1328890
def timing(description, duration, params = {})
      Gateway.timing(stat(description), duration, gateway_params(params))
    end
1095990
public function getConnectToken($account = null, $params)
    {
        if (is_string($params)) {
            $params = array('token' => $params);
        } else {
            $params = $this->checkFilterParams($params, array('token'));
            if ($params === false) {
                throw new \InvalidArgumentException("params array contains invalid parameters or misses required parameters");
            }
        }

        return $this->lastRequest->get($account, 'connect_tokens/' . $params[ 'token' ]);
    }
90541
public static function deleteExternalAccount($id, $externalAccountId, $params = null, $opts = null)
    {
        return self::_deleteNestedResource($id, static::PATH_EXTERNAL_ACCOUNTS, $externalAccountId, $params, $opts);
    }
982059
function createGateway( $inGatewayType )
    {
        $gateway_difinition = $GLOBALS[ 'eZPaymentGateways' ][ $inGatewayType ];

        $this->logger->writeTimedString( $gateway_difinition, "createGateway. gateway_difinition" );

        if( $gateway_difinition )
        {
            $class_name = $gateway_difinition[ 'class_name' ];
            return new $class_name();
        }

        return null;
    }
434981
public function getSubscription()
    {
        if ($this->getGateway() instanceof GatewayInterface) {
            return $this->getGateway()->getSubscriptionByReference($this->getSubscriptionReference());
        }

        throw new RuntimeException('Gateway is not set');
    }
431300
@Override
	@Transactional(enabled = false)
	public CommerceAccount createCommerceAccount(long commerceAccountId) {
		return commerceAccountPersistence.create(commerceAccountId);
	}
1061850
def del_downtime(self, downtime_id):
        
        if downtime_id in self.downtimes:
            self.downtimes[downtime_id].can_be_deleted = True
            del self.downtimes[downtime_id]