<commit_before><?php
namespace Cielo\API30\Ecommerce;

class Payment implements \JsonSerializable
{

    const PAYMENTTYPE_CREDITCARD = 'CreditCard';

    const PAYMENTTYPE_DEBITCARD = 'DebitCard';

    const PAYMENTTYPE_ELECTRONIC_TRANSFER = 'ElectronicTransfer';

    const PAYMENTTYPE_BOLETO = 'Boleto';

    const PROVIDER_BRADESCO = 'Bradesco';

    const PROVIDER_BANCO_DO_BRASIL = 'BancoDoBrasil';

    const PROVIDER_SIMULADO = 'Simulado';

    private $serviceTaxAmount;

    private $installments;

    private $interest;

    private $capture = false;

    private $authenticate = false;

    private $recurrent;

    private $recurrentPayment;

    private $creditCard;

    private $debitCard;

    private $authenticationUrl;

    private $tid;

    private $proofOfSale;

    private $authorizationCode;

    private $softDescriptor = "";

    private $returnUrl;

    private $provider;

    private $paymentId;

    private $type;

    private $amount;

    private $receivedDate;

    private $capturedAmount;

    private $capturedDate;

    private $currency;

    private $country;

    private $returnCode;

    private $returnMessage;

    private $status;

    private $links;

    private $extraDataCollection;

    private $expirationDate;

    private $url;

    private $number;

    private $boletoNumber;

    private $barCodeNumber;

    private $digitableLine;

    private $address;

    public function __construct($amount = 0, $installments = 1)
    {
        $this->setAmount($amount);
        $this->setInstallments($installments);
    }

    public function jsonSerialize()
    {
        return get_object_vars($this);
    }

    public function populate(\stdClass $data)
    {

        $this->serviceTaxAmount = isset($data->ServiceTaxAmount)? $data->ServiceTaxAmount: null;
        $this->installments = isset($data->Installments)? $data->Installments: null;
        $this->interest = isset($data->Interest)? $data->Interest: null;
        $this->capture = isset($data->Capture)? ! ! $data->Capture: false;
        $this->authenticate = isset($data->Authenticate)? ! ! $data->Authenticate: false;
        $this->recurrent = isset($data->Recurrent)? ! ! $data->Recurrent: false;

        if (isset($data->RecurrentPayment)) {
            $this->recurrentPayment = new RecurrentPayment(false);
            $this->recurrentPayment->populate($data->RecurrentPayment);
        }

        if (isset($data->CreditCard)) {
            $this->creditCard = new CreditCard();
            $this->creditCard->populate($data->CreditCard);
        }

        if (isset($data->DebitCard)) {
            $this->debitCard = new CreditCard();
            $this->debitCard->populate($data->DebitCard);
        }
        
        $this->expirationDate  =  isset($data->ExpirationDate)?$data->ExpirationDate: null;
        $this->url             =  isset($data->Url)?$data->ExpirationDate: null;
        $this->boletoNumber    =  isset($data->BoletoNumber)? $data->BoletoNumber: null;
        $this->barCodeNumber   =  isset($data->BarCodeNumber)?$data->BarCodeNumber: null;
        $this->digitableLine   =  isset($data->DigitableLine)?$data->DigitableLine: null;
        $this->address         =  isset($data->Address)?$data->Address: null;<commit_msg>Update Payment.php<commit_after><?php
namespace Cielo\API30\Ecommerce;

class Payment implements \JsonSerializable
{

    const PAYMENTTYPE_CREDITCARD = 'CreditCard';

    const PAYMENTTYPE_DEBITCARD = 'DebitCard';

    const PAYMENTTYPE_ELECTRONIC_TRANSFER = 'ElectronicTransfer';

    const PAYMENTTYPE_BOLETO = 'Boleto';

    const PROVIDER_BRADESCO = 'Bradesco';

    const PROVIDER_BANCO_DO_BRASIL = 'BancoDoBrasil';

    const PROVIDER_SIMULADO = 'Simulado';

    private $serviceTaxAmount;

    private $installments;

    private $interest;

    private $capture = false;

    private $authenticate = false;

    private $recurrent;

    private $recurrentPayment;

    private $creditCard;

    private $debitCard;

    private $authenticationUrl;

    private $tid;

    private $proofOfSale;

    private $authorizationCode;

    private $softDescriptor = "";

    private $returnUrl;

    private $provider;

    private $paymentId;

    private $type;

    private $amount;

    private $receivedDate;

    private $capturedAmount;

    private $capturedDate;

    private $currency;

    private $country;

    private $returnCode;

    private $returnMessage;

    private $status;

    private $links;

    private $extraDataCollection;

    private $expirationDate;

    private $url;

    private $number;

    private $boletoNumber;

    private $barCodeNumber;

    private $digitableLine;

    private $address;

    public function __construct($amount = 0, $installments = 1)
    {
        $this->setAmount($amount);
        $this->setInstallments($installments);
    }

    public function jsonSerialize()
    {
        return get_object_vars($this);
    }

    public function populate(\stdClass $data)
    {

        $this->serviceTaxAmount = isset($data->ServiceTaxAmount)? $data->ServiceTaxAmount: null;
        $this->installments = isset($data->Installments)? $data->Installments: null;
        $this->interest = isset($data->Interest)? $data->Interest: null;
        $this->capture = isset($data->Capture)? ! ! $data->Capture: false;
        $this->authenticate = isset($data->Authenticate)? ! ! $data->Authenticate: false;
        $this->recurrent = isset($data->Recurrent)? ! ! $data->Recurrent: false;

        if (isset($data->RecurrentPayment)) {
            $this->recurrentPayment = new RecurrentPayment(false);
            $this->recurrentPayment->populate($data->RecurrentPayment);
        }

        if (isset($data->CreditCard)) {
            $this->creditCard = new CreditCard();
            $this->creditCard->populate($data->CreditCard);
        }

        if (isset($data->DebitCard)) {
            $this->debitCard = new CreditCard();
            $this->debitCard->populate($data->DebitCard);
        }
        
        $this->expirationDate  =  isset($data->ExpirationDate)?$data->ExpirationDate: null;
        $this->url             =  isset($data->Url)?$data->Url: null;
        $this->boletoNumber    =  isset($data->BoletoNumber)? $data->BoletoNumber: null;
        $this->barCodeNumber   =  isset($data->BarCodeNumber)?$data->BarCodeNumber: null;
        $this->digitableLine   =  isset($data->DigitableLine)?$data->DigitableLine: null;
        $this->address         =  isset($data->Address)?$data->Address: null;
{'fraction_non_alphanumeric': 0.12802080146833894, 'fraction_numerical': 0.001223615784643622, 'mean_word_length': 2.979914790018259, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 109, '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': '5510105', 'n_tokens_mistral': 2058, 'n_tokens_neox': 1914, 'n_words': 360}