Assign data to the quote payment info instance

@param Quote $quote
@param array $data
@return void
13817
private function setQuotePaymentInfoData($quote, $data)
    {
        foreach ($data as $key => $value) {
            $this->getQuotePaymentInfoInstance($quote)->setData($key, $value)->save();
        }
    }
555911
public function set($column, $value, $quote = true)
    {
        $value = str_replace("'", "''", $value);
        $this->sets[] = $quote ? " $column = '$value'" : " $column = $value";

        return $this;
    }
865139
public function setEntity(MageQuote $quote)
    {
        $id    = $this->sgBase->getExternalCustomerId();
        $email = $this->sgBase->getMail();

        try {
            $customer = $id ? $this->customerHelper->getById($id) : $this->customerHelper->getByEmail($email);
        } catch (NoSuchEntityException $e) {
            $customer = new DataObject();
            $this->log->debug('Could not load customer by id or mail.');
        }
        $quote->setCustomerEmail($email)
            ->setRemoteIp($this->sgBase->getCustomerIp());
        if ($this->sgBase->isGuest()) {
            $quote->setCustomerIsGuest(true);
        } elseif ($customer->getId()) {
            $this->session->setCustomerId($customer->getId())->setCustomerGroupId($customer->getGroupId());

            $quote->setCustomer($customer)
                ->setCustomerIsGuest(false);
        } else {
            throw new \ShopgateLibraryException(
                \ShopgateLibraryException::UNKNOWN_ERROR_CODE,
                __('Customer with external id "%1" or email "%2" does not exist', $id, $email)->render()
            );
        }
    }
1372618
private function setQuotesAllInactive($custId)
    {
        $bind = [
            Cfg::E_QUOTE_A_IS_ACTIVE => false
        ];
        $where = Cfg::E_QUOTE_A_CUSTOMER_ID . '=' . (int)$custId;
        $this->daoGeneric->updateEntity(Cfg::ENTITY_MAGE_QUOTE, $bind, $where);
    }
1266509
protected function disabledQuoteAddressValidation(Quote $quote) {
        $billingAddress = $quote->getBillingAddress();
        $billingAddress->setShouldIgnoreValidation(true);

        if (!$quote->getIsVirtual()) {
            $shippingAddress = $quote->getShippingAddress();
            $shippingAddress->setShouldIgnoreValidation(true);

            if (!$billingAddress->getEmail()) {
                $billingAddress->setSameAsBilling(1);
            }
        }
    }
1230901
public function set(array $data) {
		foreach ($data as $name => $value) {
			$this->__set($name, $value);
		}
	}
993329
public function init(array $data = [])
    {
        foreach ($data as $key => $value) {
            $this->set($key, $value);
        }
    }
755041
public function loadSession($quote)
    {
        // not an API call, no need to emulate session
        if ($this->appState->getAreaCode() != \Magento\Framework\App\Area::AREA_WEBAPI_REST) {
            $this->replaceQuote($quote);
            return;
        }

        $customerId = $quote->getCustomerId();
        $cacheIdentifier = self::BOLT_SESSION_PREFIX . $quote->getBoltParentQuoteId();

        if ($serialized = $this->cache->load($cacheIdentifier)) {
            $sessionData = unserialize($serialized);
            $sessionID = $sessionData["sessionID"];

            if ($sessionData["sessionType"] == "frontend") {
                // shipping and tax, orphaned transaction
                // cart belongs to logged in customer?
                if ($customerId) {
                    $this->setSession($this->checkoutSession, $sessionID);
                    $this->setSession($this->customerSession, $sessionID);
                }
            } else {
                // orphaned transaction
                $this->setSession($this->adminCheckoutSession, $sessionID);
            }
        }

        if ($customerId) {
            $this->customerSession->loginById($customerId);
        }
        $this->replaceQuote($quote);
    }
1058654
protected function hydrateQuoteWithPayment(QuoteTransfer $quoteTransfer)
    {
        $paymentTransfer = new PaymentTransfer();
        $payone = new PayonePaymentTransfer();
        $paymentDetailTransfer = new PaymentDetailTransfer();
        $paymentDetailTransfer
            ->setAmount($quoteTransfer->getTotals()->getGrandTotal())
            ->setType(PayoneApiConstants::E_WALLET_TYPE_PAYPAL)
            ->setCurrency(Store::getInstance()->getCurrencyIsoCode())
            ->setWorkOrderId(
                $quoteTransfer->getPayment()->getPayonePaypalExpressCheckout()->getWorkOrderId()
            );
        $payone->setPaymentMethod(PayoneApiConstants::PAYMENT_METHOD_PAYPAL_EXPRESS_CHECKOUT);
        $payone->setPaymentDetail($paymentDetailTransfer);

        $paymentTransfer->setPayone($payone);
        $paymentTransfer->setPaymentSelection(PayoneConstants::PAYMENT_METHOD_PAYPAL_EXPRESS_CHECKOUT_STATE_MACHINE);
        $paymentTransfer->setPaymentMethod(PayoneApiConstants::PAYMENT_METHOD_PAYPAL_EXPRESS_CHECKOUT);
        $paymentTransfer->setPaymentProvider(PayoneConstants::PROVIDER_NAME);
        $paypalExpressCheckoutPayment = new PayonePaypalExpressCheckoutTransfer();
        $paymentTransfer->setPayonePaypalExpressCheckout($paypalExpressCheckoutPayment);
        $quoteTransfer->setPayment($paymentTransfer);

        return $quoteTransfer;
    }
886646
protected function setExpressCheckoutRecurringPaymentConfig($data, $subscription = false)
    {
        $billingType = $this->billingType;

        // Overwrite billing type if $subscription flag is enabled
        if ($subscription) {
            $billingType = 'RecurringPayments';
        }

        // Send L_BILLINGTYPE0 and L_BILLINGAGREEMENTDESCRIPTION0 only if there is billing type
        if (isset($billingType)) {
            $this->post = $this->post->merge([
                'L_BILLINGTYPE0'                 => $billingType,
                'L_BILLINGAGREEMENTDESCRIPTION0' => !empty($data['subscription_desc']) ?
                    $data['subscription_desc'] : $data['invoice_description'],
            ]);
        }
    }
250882
private function setAddress($quoteAddress, $address)
    {
        $address = $this->cartHelper->handleSpecialAddressCases($address);

        $region = $this->regionModel->loadByName(@$address->region, @$address->country_code);

        $addressData = [
            'firstname'    => @$address->first_name,
            'lastname'     => @$address->last_name,
            'street'       => trim(@$address->street_address1 . "\n" . @$address->street_address2),
            'city'         => @$address->locality,
            'country_id'   => @$address->country_code,
            'region'       => @$address->region,
            'postcode'     => @$address->postal_code,
            'telephone'    => @$address->phone_number,
            'region_id'    => $region ? $region->getId() : null,
            'company'      => @$address->company,
        ];

        if ($this->cartHelper->validateEmail(@$address->email_address)) {
            $addressData['email'] = $address->email_address;
        }

        // discard empty address fields
        foreach ($addressData as $key => $value) {
            if (empty($value)) {
                unset($addressData[$key]);
            }
        }

        $quoteAddress->setShouldIgnoreValidation(true);
        $quoteAddress->addData($addressData)->save();
    }
436671
public function add(array $data)
    {
        $defaults = array(
            "description" => null,
            "price"       => null,
            "discount"    => null,
            "qty"         => 1,
            "unit"        => null
        );

        $merged = array_merge($defaults, $data);

        $line = $this->create($this->quotationHandle);

        if( isset($merged['product']) )
        {
            $this->product($line, $merged['product']);
            unset( $merged['product'] );
        }

        foreach( $merged as $name => $value )
        {
            if( is_null($value) )
                continue;

            switch($name)
            {
                case 'description':
                    $this->description($line, $value);
                    break;
                case 'price':
                    $this->price($line, $value);
                    break;
                case 'discount':
                    $this->discount($line, $value);
                    break;
                case 'qty':
                    $this->qty($line, $value);
                    break;
                case 'unit':
                    $this->unit($line, $value);
                    break;
            }
        }
    }
391684
public function manageMandate(QuoteTransfer $quoteTransfer)
    {
        $manageMandateTransfer = new PayoneManageMandateTransfer();
        $manageMandateTransfer->setBankCountry($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankcountry());
        $manageMandateTransfer->setBankAccount($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankaccount());
        $manageMandateTransfer->setBankCode($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankcode());
        $manageMandateTransfer->setIban($quoteTransfer->getPayment()->getPayoneDirectDebit()->getIban());
        $manageMandateTransfer->setBic($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBic());
        $personalData = new PayonePersonalDataTransfer();
        $customer = $quoteTransfer->getCustomer();
        $billingAddress = $quoteTransfer->getBillingAddress();
        $personalData->setCustomerId($customer->getIdCustomer());
        $personalData->setLastName($billingAddress->getLastName());
        $personalData->setFirstName($billingAddress->getFirstName());
        $personalData->setCompany($billingAddress->getCompany());
        $personalData->setCountry($billingAddress->getIso2Code());
        $personalData->setCity($billingAddress->getCity());
        $personalData->setStreet($billingAddress->getAddress1());
        $personalData->setZip($billingAddress->getZipCode());
        $personalData->setEmail($billingAddress->getEmail() ?? $customer->getEmail());
        $manageMandateTransfer->setPersonalData($personalData);

        return $this->getFactory()->createZedStub()->manageMandate($manageMandateTransfer);
    }
858757
private function setData($data) {
        $this->indcheck = $data[0];
        $this->data = $data[1];
        $this->calculateChecksum();
        $this->data[] = $this->code[$this->checksumValue];
        $this->data[] = $this->code[self::KEY_STOP];
    }
911039
public function setData($data = [])
    {
        if (!is_array($data) && is_string($data)) {
            $data = parse_str($data);
        }
        if (count($data) == 0) {
            $this->data = [];
        } else {
            $this->data = $data;
        }
        $this->debug->debug(__FUNCTION__, 'Data into Request: ', $this->data);
    }
251955
protected function setPaymentSuccessIncludePath(QuoteTransfer $quoteTransfer)
    {
        $quoteTransfer->requirePayment()->getPayment()->setSummaryIncludePath(self::CHECKOUT_INCLUDE_SUMMARY_PATH);
        $quoteTransfer->requirePayment()->getPayment()->setSuccessIncludePath(self::CHECKOUT_INCLUDE_SUCCESS_PATH);
    }
233030
public function set(array $data)
    {
        $this->data = [];
        $this->replace = false;

        foreach ($data as $key => $value) {
            $this->add($key, $value);
        }
    }