Gets the saldo of given SEPAAccount.

@param SEPAAccount $account
@return Model\Saldo|null
@throws Adapter\Exception\AdapterException
@throws Adapter\Exception\CurlException
@throws \Exception
177770
public function getSaldo(SEPAAccount $account)
    {
        $dialog = $this->getDialog();
        $dialog->syncDialog();
        $dialog->initDialog();

        switch ((int) $dialog->getHksalMaxVersion()) {
            case 4:
            case 5:
                $hksalAccount = new Deg(
                    $account->getAccountNumber(),
                    $account->getSubAccount(),
                    static::DEFAULT_COUNTRY_CODE, $account->getBlz()
                );
                $hksalAccount->addDataElement($account->getAccountNumber());
                $hksalAccount->addDataElement($account->getSubAccount());
                $hksalAccount->addDataElement(static::DEFAULT_COUNTRY_CODE);
                $hksalAccount->addDataElement($account->getBlz());
                break;
            case 6:
                $hksalAccount = new Ktv(
                    $account->getAccountNumber(),
                    $account->getSubAccount(),
                    new Kik(280, $account->getBlz())
                );
                break;
            case 7:
                $hksalAccount = new Kti(
                    $account->getIban(),
                    $account->getBic(),
                    $account->getAccountNumber(),
                    $account->getSubAccount(),
                    new Kik(280, $account->getBlz())
                );
                break;
            default:
                throw new \Exception('Unsupported HKSAL version: ' . $dialog->getHksalMaxVersion());
        }

        $message = new Message(
            $this->bankCode,
            $this->username,
            $this->pin,
            $dialog->getSystemId(),
            $dialog->getDialogId(),
            $dialog->getMessageNumber(),
            array(
                new HKSAL($dialog->getHksalMaxVersion(), 3, $hksalAccount, HKSAL::ALL_ACCOUNTS_N)
            ),
            array(
                AbstractMessage::OPT_PINTAN_MECH => $dialog->getSupportedPinTanMechanisms()
            )
        );

        $response = $dialog->sendMessage($message);
        $response = new GetSaldo($response->rawResponse);

        return $response->getSaldoModel();
    }
1143298
public function unsuspendAccount($account, $reason = "", $info = "")
    {
        return $this->api->unsuspendAccount($this->getAccountId($account), $reason, $info);
    }
61649
public function removeAddressRelation($account, $accountAddress)
    {
        if (!$account || !$accountAddress) {
            throw new \Exception('Account and AccountAddress cannot be null');
        }

        // Reload address to get all data (including relational data).
        /** @var AddressEntity $address */
        $address = $accountAddress->getAddress();
        $address = $this->em->getRepository('SuluContactBundle:Address')
            ->findById($address->getId());

        $isMain = $accountAddress->getMain();

        // Remove relation.
        $address->removeAccountAddress($accountAddress);
        $account->removeAccountAddress($accountAddress);

        // If was main, set a new one.
        if ($isMain) {
            $this->setMainForCollection($account->getAccountContacts());
        }

        // Delete address if it has no more relations.
        if (!$address->hasRelations()) {
            $this->em->remove($address);
        }

        $this->em->remove($accountAddress);
    }
682576
public function myTopicAccess(AccountInterface $account) {
    // Fetch user from url.
    $user = $this->requestStack->getCurrentRequest()->get('user');

    // If we don't have a user in the request, assume it's my own profile.
    if (is_null($user)) {
      // Usecase is the user menu, which is generated on all LU pages.
      $user = User::load($account->id());
    }

    // If not a user then just return neutral.
    if (!$user instanceof User) {
      $user = User::load($user);

      if (!$user instanceof User) {
        return AccessResult::neutral();
      }
    }

    // Own profile?
    if ($user->id() === $account->id()) {
      return AccessResult::allowedIfHasPermission($account, 'view topics on my profile');
    }
    return AccessResult::allowedIfHasPermission($account, 'view topics on other profiles');
  }
363161
public AbucoinsAccount getAbucoinsAccount(String accountID) throws IOException {
    AbucoinsAccount account =
        abucoinsAuthenticated.getAccount(
            accountID,
            exchange.getExchangeSpecification().getApiKey(),
            signatureCreator,
            exchange.getExchangeSpecification().getPassword(),
            timestamp());
    if (account.getMessage() != null) throw new ExchangeException(account.getMessage());

    return account;
  }
154046
public function getProvisionRelatedLdapEntry($account, $prov_events = NULL) {
    if (!$prov_events) {
      $prov_events = ldap_user_all_events();
    }
    $sid = $this->ldapEntryProvisionServer; //
    //debug("ldapEntryProvisionServer:$sid");
    if (!$sid) {
      return FALSE;
    }
    // $user_entity->ldap_user_prov_entries,
    $ldap_server = ldap_servers_get_servers($sid, NULL, TRUE);
    $params = array(
      'direction' => LDAP_USER_PROV_DIRECTION_TO_LDAP_ENTRY,
      'prov_events' => $prov_events,
      'module' => 'ldap_user',
      'function' => 'getProvisionRelatedLdapEntry',
      'include_count' => FALSE,
      );
    list($proposed_ldap_entry, $error) = $this->drupalUserToLdapEntry($account, $ldap_server, $params);
    if (!(is_array($proposed_ldap_entry) && isset($proposed_ldap_entry['dn']) && $proposed_ldap_entry['dn'])) {
      return FALSE;
    }
    $ldap_entry = $ldap_server->dnExists($proposed_ldap_entry['dn'], 'ldap_entry', array());
    return $ldap_entry;

  }
1064415
public function getCompanyForBUC($account, $bankCode = null)
    {
        $bucer      = new \FlexiPeeHP\FlexiBeeRW(null,
            ['evidence' => 'adresar-bankovni-ucet']);
        $companyRaw = $bucer->getColumnsFromFlexibee(['firma'],
            empty($bankCode) ? ['buc' => $account] : ['buc' => $account, 'smerKod' => $bankCode]);
        return array_key_exists(0, $companyRaw) ? $companyRaw[0]['firma'] : null;
    }
830996
protected function getMainAccountContact()
    {
        $accountContacts = $this->getAccountContacts();

        if (!is_null($accountContacts)) {
            /** @var AccountContact $accountContact */
            foreach ($accountContacts as $accountContact) {
                if ($accountContact->getMain()) {
                    return $accountContact;
                }
            }
        }

        return;
    }
1288246
public function suspendAccount($account, $reason = "", $info = "")
    {
        return $this->api->suspendAccount($this->getAccountId($account), $reason, $info);
    }
785766
public function getUrl($account, $key) {

    $url['url'] = $this->psl['text/filter']->t('otpauth://totp/&account?secret=&key',
                    array('&account' => $account, '&key' => $key)
                  );

    $url['qr']  = $this->psl['text/filter']->t('https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/&account?secret=&key',
                    array('&account' => $account, '&key' => $key)
                  );

    return $url;
  }
321127
public function get($account, $action = '', $parameters = null, $acceptableContentTypes = null)
    {
        if (is_array($account)) {
            $tmp_results = array();
            foreach ($account as $accnt) {
                $result = $this->sendRequest('GET', $accnt, $action, $parameters, null, $acceptableContentTypes);
                if ($result === false) {
                    return false;
                }
                $tmp_results[ $accnt ] = $result;
            }
            
            return $tmp_results;
        }
        
        return $this->sendRequest('GET', $account, $action, $parameters, null, $acceptableContentTypes);
    }
615993
public function getAccountData(\Flowpack\SingleSignOn\Server\Domain\Model\SsoClient $ssoClient, \TYPO3\Flow\Security\Account $account) {
		if ($this->configuration !== NULL) {
			$configuration = $this->configuration;
		} else {
			$configuration = $this->getDefaultConfiguration($ssoClient, $account);
		}
		$partyData = $this->transformValue($account->getParty(), $configuration['party']);
		$mappedRoles = array();
		foreach ($account->getRoles() as $role) {
			$mappedRoles[] = $role->getIdentifier();
		}
		return array(
			'accountIdentifier' => $account->getAccountIdentifier(),
			'roles' => $mappedRoles,
			'party' => $partyData
		);
	}
991040
public function getAddressesByAccount($account)
    {
        $args = [
            (string)$account
        ];
        return $this->rpc->query(__FUNCTION__, $args);
    }
70589
public static function getInstance($cloudId, Account $account)
    {
        $signer = new PandaSigner();
        $signer->setCloudId($cloudId);
        $signer->setAccount($account);

        return $signer;
    }
20915
def get_balance(self, account: SEPAAccount):
        

        with self._get_dialog() as dialog:
            hksal = self._find_highest_supported_command(HKSAL5, HKSAL6, HKSAL7)

            seg = hksal(
                account=hksal._fields['account'].type.from_sepa_account(account),
                all_accounts=False,
            )

            response = dialog.send(seg)

            for resp in response.response_segments(seg, 'HISAL'):
                return resp.balance_booked.as_mt940_Balance()
837428
public function getConnectedAccount($qualifier = null) {
		if (!$qualifier) $qualifier = $this->getConnectionQualifier();
		if (!$qualifier) return null;
		return $this->getDocument()->getGraph()->getNode($this->getAAUID().':account:'.$qualifier);
	}
1014700
protected static function fetchUser(Account $account)
    {
        $user = static::getFinder()->findUserByEmail($account->email);

        if (null !== $user) {
            return $user;
        }

        $user = \Yii::createObject([
            'class'    => User::className(),
            'scenario' => 'connect',
            'username' => $account->username,
            'email'    => $account->email,
        ]);

        if (!$user->validate(['email'])) {
            $account->email = null;
        }

        if (!$user->validate(['username'])) {
            $account->username = null;
        }

        return $user->create() ? $user : false;
    }