Stores the given or fetched billing address in the basket.
176263
public function process()
	{
		$context = $this->_getContext();
		$view = $this->getView();

		try
		{
			if( ( $id = $view->param( 'ca-delivery-delete', null ) ) !== null )
			{
				$customerAddressManager = MShop_Factory::createManager( $context, 'customer/address' );
				$address = $customerAddressManager->getItem( $id );

				if( $address->getRefId() != $context->getUserId() ) {
					throw new Client_Html_Exception( sprintf( 'Address with ID "%1$s" not found', $id ) );
				}

				$customerAddressManager->deleteItem( $id );
			}

			// only start if there's something to do
			if( $view->param( 'ca-delivery-option', null ) === null ) {
				return;
			}

			$basketCtrl = Controller_Frontend_Factory::createController( $context, 'basket' );

			/** client/html/common/address/delivery/disable-new
			 * Disables the option to enter a different delivery address for an order
			 *
			 * Besides the billing address, customers can usually enter a different
			 * delivery address as well. To suppress displaying the form fields for
			 * a delivery address, you can set this configuration option to "1".
			 *
			 * @param boolean A value of "1" to disable, "0" enables the delivery address form
			 * @since 2014.03
			 * @category User
			 * @category Developer
			 * @see client/html/common/address/delivery/salutations
			 * @see client/html/common/address/delivery/mandatory
			 * @see client/html/common/address/delivery/optional
			 * @see client/html/common/address/delivery/hidden
			 */
			$disable = $view->config( 'client/html/common/address/delivery/disable-new', false );
			$type = MShop_Order_Item_Base_Address_Abstract::TYPE_DELIVERY;

			if( ( $option = $view->param( 'ca-delivery-option', 'null' ) ) === 'null' && $disable === false ) // new address
			{
				$params = $view->param( 'ca-delivery', array() );
				$invalid = $this->_checkFields( $params );

				if( count( $invalid ) > 0 )
				{
					$view->deliveryError = $invalid;
					throw new Client_Html_Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
				}

				$basketCtrl->setAddress( $type, $params );
			}
			else if( ( $option = $view->param( 'ca-delivery-option', 'null' ) ) !== '-1' ) // existing address
			{
				$customerAddressManager = MShop_Factory::createManager( $context, 'customer/address' );
				$address = $customerAddressManager->getItem( $option );

				if( $address->getRefId() != $context->getUserId() ) {
					throw new Client_Html_Exception( sprintf( 'Address with ID "%1$s" not found', $option ) );
				}

				$invalid = array();
				$params = $view->param( 'ca-delivery-' . $option, array() );

				if( !empty( $params ) )
				{
					$list = array();
					$invalid = $this->_checkFields( $params );

					foreach( $params as $key => $value ) {
						$list[ str_replace( 'order.base', 'customer', $key ) ] = $value;
					}

					$address->fromArray( $list );
					$customerAddressManager->saveItem( $address );
				}

				if( count( $invalid ) > 0 )
				{
					$view->deliveryError = $invalid;
					throw new Client_Html_Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
				}

				$basketCtrl->setAddress( $type, $address );
			}
			else
			{
				$basketCtrl->setAddress( $type, null );
			}

			parent::process();
		}
		catch( Controller_Frontend_Exception $e )
		{
			$view->deliveryError = $e->getErrorList();
			throw $e;
		}
	}
1239452
protected function addAddress()
    {
        if (!$this->isError()) {

            $id = $this->address->add($this->getSubmitted());

            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }

            $this->line($id);
        }
    }
507420
public function deposit($iOrderNumber, $iAmount, $sCurrency, $basket=null)
    {
        $this->_requestData[self::COMMAND] = self::$COMMAND_DEPOSIT;

        $this->_setField(self::ORDER_NUMBER, $iOrderNumber);
        $this->_setField(self::AMOUNT, $iAmount);
        $this->_setField(self::CURRENCY, strtoupper($sCurrency));
        $this->_setBasket($basket);

        $this->_fingerprintOrder->setOrder(Array(
            self::CUSTOMER_ID,
            self::SHOP_ID,
            self::TOOLKIT_PASSWORD,
            self::SECRET,
            self::COMMAND,
            self::LANGUAGE,
            self::ORDER_NUMBER,
            self::AMOUNT,
            self::CURRENCY
        ));
        $this->_appendBasketFingerprintOrder($basket);

        return new WirecardCEE_QPay_Response_Toolkit_Deposit($this->_send());
    }
1316307
private void setAddress(Address address, RolodexContract rolodex) {
        if (rolodex != null) {
            address.setStreet1(rolodex.getAddressLine1());
            address.setStreet2(rolodex.getAddressLine2());
            address.setCity(checkNull(rolodex.getCity()));
            address.setCounty(rolodex.getCounty());
            address.setState(rolodex.getState());
            address.setZipCode(rolodex.getPostalCode());
            if (rolodex.getCountryCode() != null) {
                CountryCodeType.Enum country = CountryCodeType.Enum.forString(rolodex.getCountryCode());
                address.setCountry(country);
            }
        }else {
            address.setStreet1("");
            address.setCity("");
        }
    }
469904
def _store(self, con):
        """"""
        self._con = con
        self._transaction = False
        self._closed = False
        self._usage = 0
1249252
def get_storage(address)
      storage_root = get_account_item address, :storage
      SecureTrie.new PruningTrie.new(db, storage_root)
    end
433569
private function setSenderPhone()
    {
        $addressData = ($this->getBillingAddress())
            ? $this->getBillingAddress()
            : $this->_order->getShippingAddress();

        if (! empty($addressData['telephone'])) {
            $phone = \UOL\PagSeguro\Helper\Data::formatPhone($addressData['telephone']);
            $this->_paymentRequest->setSender()->setPhone()->withParameters(
                $phone['areaCode'],
                $phone['number']
            );
        }
    }
1023589
def sync(self, data):
        """"""
        for k, v in data.get('billing', {}).items():
            setattr(self, k, v)
        self.card_number = data.get('credit_card', {}).get('card_number',
                                                           self.card_number)
        self.save(sync=False)
259380
def handle_address_save(self, sender, instance, **kwargs):
    
    objects = self.find_associated_with_address(instance)
    for obj in objects:
      self.handle_save(obj.__class__, obj)
1243595
def create_shipping_address(self, shipping_address):
        """"""
        url = urljoin(self._url, '/shipping_addresses')
        return shipping_address.post(url)
402482
private function _calculatePaymentAmountBasedOnBuyerDestinationAddress ()
    {
        $response = $this->callStepAndCheckForException('getBillingAgreementDetails');
        
        $this->printResponseToWebpage("printGetBillingAgreementDetailsResponse", array(
            $response
        ));
        
        $paymentAmountPreTaxAndShipping = $this->_getPreTaxAndShippingPaymentAmountFromQueryParams();
        $shippingType = $this->_getShippingTypeFromQueryParams();
        
        return $this->exampleClass->calculatePaymentAmountBasedOnBuyerDetails(
                $response->getGetBillingAgreementDetailsResult()
                    ->getBillingAgreementDetails(), $paymentAmountPreTaxAndShipping, $shippingType);
    }
216646
public function init()
    {
        // disabling performance control variable
        \OxidEsales\Eshop\Core\Registry::getConfig()->setConfigParam('bl_perfCalcVatOnlyForBasketOrder', false);

        // recalc basket cause of payment stuff
        if ($oBasket = $this->getBasket()) {
            $oBasket->onUpdate();
        }

        parent::init();
    }
259477
function checkAddressBalance(url, address, options) {
  options = options || {};
  let path = '/address/.../balance'.replace('...', address);
  url = resolveURL(url, path);

  return new P(function (resolve, reject) {
    request({
      url: url,
      method: 'GET',
      headers: options.headers
    }, function (err, res, body) {
      if (err) return reject(err);
      return resolve(body);
    });
  });
}
221634
protected function _storeAddresses( MShop_Order_Item_Base_Interface $basket )
	{
		$manager = $this->getSubManager( 'address' );

		foreach( $basket->getAddresses() as $type => $item )
		{
			$item->setBaseId( $basket->getId() );
			$item->setType( $type );
			$manager->saveItem( $item );
		}
	}
264896
function PurchaseSchema() {
    /**
     * The cartId value
     * @member
     */
    this.cartId = null;
    /**
     * The storeId value
     * @member
     */
    this.storeId = null;
    /**
     * The orderId value
     * @member
     */
    this.orderId = null;
    /**
     * The payment of value
     * @member
     * @type { Payment }
     */
    this.payment = Object.create(Payment.prototype);
    /**
     * The shippingAddress of value
     * @member
     * @type { ShippingAddress }
     */
    this.shippingAddress = Object.create(ShippingAddress.prototype);
    /**
     * The billingAddress of value
     * @member
     * @type { BillingAddress }
     */
    this.billingAddress = Object.create(BillingAddress.prototype);
    /**
     * The paymentGateway value
     * @member
     */
    this.paymentGateway = null;
    /**
     * The note value
     * @member
     */
    this.note = null;
    /**
     * The buyerAcceptsMarketing value
     * @member
     */
    this.buyerAcceptsMarketing = null;

}
840989
def update_billing_info(self, billing_info):
        """"""
        url = urljoin(self._url, '/billing_info')
        response = billing_info.http_request(url, 'PUT', billing_info,
            {'Content-Type': 'application/xml; charset=utf-8'})
        if response.status == 200:
            pass
        elif response.status == 201:
            billing_info._url = response.getheader('Location')
        else:
            billing_info.raise_http_error(response)

        response_xml = response.read()
        logging.getLogger('recurly.http.response').debug(response_xml)
        billing_info.update_from_element(ElementTree.fromstring(response_xml))
456450
public function updateUserWithAmazonData()
    {
        $billingAddress = $this->getAmazonBillingAddress();

        if ($billingAddress !== null) {
            $oUser = $this->getUser();
            $oUser->assign($billingAddress);
            $oUser->save();
        }
    }