<commit_before><?php
/*
* This file is part of the PayBreak/paybreak-sdk-php package.
*
* (c) PayBreak <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace PayBreak\Sdk\Gateways;

/**
 * Customer Intelligence Gateway
 *
 * @author GK
 */
class CustomerIntelligenceGateway extends AbstractGateway
{
    /**
     * @author GK
     * @param string $installation
     * @param string $token
     * @param int $offset
     * @param int $limit
     * @return array
     * @throws \WNowicki\Generic\Exception
     */
    public function getCustomerIntelligence($installation, $token, $offset = 0, $limit = 20)
    {
        return $this->fetchDocument(
            '/v4/installations/' . $installation . '/lead-score?offset=' . $offset . '&limit=' . $limit,
            $token,
            'LeadScore'
        );
    }

    /**
     * @author GK
     * @param string $installation
     * @param array $body
     * @param string $token
     * @return array
     * @throws \WNowicki\Generic\Exception
     */
    public function performLeadScore($installation, array $body, $token)
    {
        return $this->postDocument(
            '/v4/installations/' . $installation . '/lead-score',
            $body,
            $token,
            'LeadScore'
        );
    }
}<commit_msg>Add performPreApproval gateway action<commit_after><?php
/*
* This file is part of the PayBreak/paybreak-sdk-php package.
*
* (c) PayBreak <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace PayBreak\Sdk\Gateways;

/**
 * Customer Intelligence Gateway
 *
 * @author GK
 */
class CustomerIntelligenceGateway extends AbstractGateway
{
    /**
     * @author GK
     * @param string $installation
     * @param string $token
     * @param int $offset
     * @param int $limit
     * @return array
     * @throws \WNowicki\Generic\Exception
     */
    public function getCustomerIntelligence($installation, $token, $offset = 0, $limit = 20)
    {
        return $this->fetchDocument(
            '/v4/installations/' . $installation . '/lead-score?offset=' . $offset . '&limit=' . $limit,
            $token,
            'LeadScore'
        );
    }

    /**
     * @author GK
     * @param string $installation
     * @param array $body
     * @param string $token
     * @return array
     * @throws \WNowicki\Generic\Exception
     */
    public function performLeadScore($installation, array $body, $token)
    {
        return $this->postDocument(
            '/v4/installations/' . $installation . '/lead-score',
            $body,
            $token,
            'LeadScore'
        );
    }

    /**
     * @author GK
     * @param string $installation
     * @param array $body
     * @param string $token
     * @return array
     * @throws \WNowicki\Generic\Exception
     */
    public function performPreApproval($installation, array $body, $token)
    {
        return $this->postDocument(
            '/v4/installations/' . $installation . '/pre-approval',
            $body,
            $token,
            'PreApproval'
        );
    }
}
{'fraction_non_alphanumeric': 0.12379770400248216, 'fraction_numerical': 0.0034129692832764505, 'mean_word_length': 2.1576885406464252, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6097757', 'n_tokens_mistral': 949, 'n_tokens_neox': 932, 'n_words': 246}