Lookup an account's shipping addresses
<p>
Returns the account's shipping addresses

@param accountCode recurly account id
@return the shipping addresses associated with this account on success, null otherwise
161790
public ShippingAddresses getAccountShippingAddresses(final String accountCode) {
        return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + ShippingAddresses.SHIPPING_ADDRESSES_RESOURCE,
                ShippingAddresses.class, new QueryParams());
    }
668432
public InvoiceCollection postAccountInvoice(final String accountCode, final Invoice invoice) {
        return doPOST(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Invoices.INVOICES_RESOURCE, invoice, InvoiceCollection.class);
    }
349174
@Override
	public void cacheResult(CommerceShippingMethod commerceShippingMethod) {
		entityCache.putResult(CommerceShippingMethodModelImpl.ENTITY_CACHE_ENABLED,
			CommerceShippingMethodImpl.class,
			commerceShippingMethod.getPrimaryKey(), commerceShippingMethod);

		finderCache.putResult(FINDER_PATH_FETCH_BY_G_E,
			new Object[] {
				commerceShippingMethod.getGroupId(),
				commerceShippingMethod.getEngineKey()
			}, commerceShippingMethod);

		commerceShippingMethod.resetOriginalValues();
	}
650428
@Override
	public void cacheResult(
		List<CommerceShippingMethod> commerceShippingMethods) {
		for (CommerceShippingMethod commerceShippingMethod : commerceShippingMethods) {
			if (entityCache.getResult(
						CommerceShippingMethodModelImpl.ENTITY_CACHE_ENABLED,
						CommerceShippingMethodImpl.class,
						commerceShippingMethod.getPrimaryKey()) == null) {
				cacheResult(commerceShippingMethod);
			}
			else {
				commerceShippingMethod.resetOriginalValues();
			}
		}
	}
133646
public InetAddress
getAddress() {
	try {
		if (name == null)
			return InetAddress.getByAddress(address);
		else
			return InetAddress.getByAddress(name.toString(),
							address);
	} catch (UnknownHostException e) {
		return null;
	}
}
79612
public java.util.List<String> getCcAddresses() {
        if (ccAddresses == null) {
            ccAddresses = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return ccAddresses;
    }
1364699
public Account updateAccount(final String accountCode, final Account account) {
        return doPUT(Account.ACCOUNT_RESOURCE + "/" + accountCode, account, Account.class);
    }
736496
private function _calculateOrderTotalBasedOnBuyerDestinationAddress()
    {
        $response = $this->callStepAndCheckForException('getOrderReferenceDetails');
        
        $this->printResponseToWebpage(
            "printGetOrderReferenceDetailsResponse", array($response)
        );

        $orderTotalPreTaxAndShipping
            = $this->_getPreTaxAndShippingOrderAmountFromQueryParams();
        $shippingType = $this->_getShippingTypeFromQueryParams();
    
        return $this->exampleClass->calculateOrderTotalBasedOnBuyerDetails(
            $response->getGetOrderReferenceDetailsResult()->getOrderReferenceDetails(),
            $orderTotalPreTaxAndShipping,
            $shippingType
        );
    }
310093
@Override
	public List<CommerceOrderPayment> findByCommerceOrderId(
		long commerceOrderId) {
		return findByCommerceOrderId(commerceOrderId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
267795
@Override
	public void cacheResult(CommerceOrderNote commerceOrderNote) {
		entityCache.putResult(CommerceOrderNoteModelImpl.ENTITY_CACHE_ENABLED,
			CommerceOrderNoteImpl.class, commerceOrderNote.getPrimaryKey(),
			commerceOrderNote);

		finderCache.putResult(FINDER_PATH_FETCH_BY_C_ERC,
			new Object[] {
				commerceOrderNote.getCompanyId(),
				commerceOrderNote.getExternalReferenceCode()
			}, commerceOrderNote);

		commerceOrderNote.resetOriginalValues();
	}
304390
public Redemption getCouponRedemptionByAccount(final String accountCode) {
        return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTION_RESOURCE,
                     Redemption.class);
    }
1052763
@Override
	public List<CommerceShipmentItem> findByCommerceShipment(
		long commerceShipmentId) {
		return findByCommerceShipment(commerceShipmentId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
1106878
@Override
	public void cacheResult(List<CommerceShipment> commerceShipments) {
		for (CommerceShipment commerceShipment : commerceShipments) {
			if (entityCache.getResult(
						CommerceShipmentModelImpl.ENTITY_CACHE_ENABLED,
						CommerceShipmentImpl.class,
						commerceShipment.getPrimaryKey()) == null) {
				cacheResult(commerceShipment);
			}
			else {
				commerceShipment.resetOriginalValues();
			}
		}
	}
777488
@Override
	public List<CommerceAddressRestriction> findByC_C(long classNameId,
		long classPK) {
		return findByC_C(classNameId, classPK, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
504404
public MailAccount lookupUsedMailAccountForCurrentThread(final String accountReservationKey) {
		lock.lock();
		try {
			Map<MailAccount, ThreadReservationKeyWrapper> usedAccountsForThread = filterValues(usedAccounts, new CurrentThreadWrapperPredicate());
			if (!usedAccountsForThread.isEmpty()) {
				for (Entry<MailAccount, ThreadReservationKeyWrapper> entry : usedAccountsForThread.entrySet()) {
					if (entry.getValue().accountReservationKey.equals(accountReservationKey)) {
						return entry.getKey();
					}
				}
			}

			return null;
		} finally {
			lock.unlock();
		}
	}
598721
public GiftCard redeemGiftCard(final String redemptionCode, final String accountCode) {
        final GiftCard.Redemption redemptionData = GiftCard.createRedemption(accountCode);
        final String url = GiftCards.GIFT_CARDS_RESOURCE + "/" + redemptionCode + "/redeem";

        return doPOST(url, redemptionData, GiftCard.class);
    }
603296
public function getAccountByCode($type_code)
    {
        switch ($type_code)
        {
            case Account::TYPE_ACCOUNTS_RECEIVABLE:
            case Account::TYPE_ACCOUNTS_PAYABLE:
            case Account::TYPE_SALES:
            case Account::TYPE_BANK:

                foreach ($this->getAccounts() as $account)
                {
                    if ($account->getTypeCode() == $type_code)
                    {
                        return $account;
                    }
                }

                // We couldn't find an account, so let's create one
                $account = new Account();
                $account->setBalance(0);
                $account->setProfile($this);
                $account->setTypeCode($type_code);
                $account->setName($this->getName().Account::getAccountNameSuffix($type_code));

                return $account;


            default:

                throw new \Exception('Invalid account code: '.$account_code);
        }
    }