retreive the stripe token
 /accounts/:account_id/stripe_token
338061
def stripe_token
      plaid_account = PlaidRails::Account.find(params[:id])
      client = Plaid::Client.new(env: PlaidRails.env,
        client_id: PlaidRails.client_id,
        secret: PlaidRails.secret,
        public_key: PlaidRails.public_key)
      stripe_response = client.processor.stripe.bank_account_token.
        create(plaid_account.access_token, plaid_account.plaid_id)
      bank_account_token = stripe_response['stripe_bank_account_token']
      plaid_account.update(stripe_token: bank_account_token)
      render json: {id: bank_account_token}
    end
146911
def wallet_account
      response = JSON.parse(@client.get("users/#{send(:id)}/wallet_accounts").body)
      Promisepay::WalletAccount.new(@client, response['wallet_accounts'])
    rescue Promisepay::UnprocessableEntity
      nil
    end
802391
def GetAccounts(alias=None):
		""""""
		if alias is not None:  payload = {'AccountAlias': alias}
		else:  payload = {}
		r = clc.v1.API.Call('post','Account/GetAccounts',payload)
		if int(r['StatusCode']) == 0:  
			# Assume first response is always the original account.  Not sure if this is reliable
			if not clc.ALIAS:  clc.ALIAS = r['Accounts'][0]['AccountAlias']
			if not clc.LOCATION:  clc.LOCATION = r['Accounts'][0]['Location']

			return(r['Accounts'])
1191296
def create_stripe_token!
      return if stripe_token.blank?

      Rails.logger.info "[STRIPE] update source: #{stripe_token}"
      customer.stripe_customer.source = stripe_token
      customer.stripe_customer.save

      return if customer.stripe_customer.default_source.blank?

      card = customer.stripe_customer.sources.retrieve(customer.stripe_customer.default_source)
      customer.active_card = "**** **** **** #{card.last4} #{card.brand} #{card.exp_month}/#{card.exp_year}"
      customer.save!
    end
1194397
def account_info(self):
        
        response = self._post(self.apiurl + "/v2/account/info", data={'apikey': self.apikey})

        return self._raise_or_extract(response)
1137920
def get_account_from_hash(self, account_hash):
        
        for _, pool in self.pools:
            account = pool.get_account_from_hash(account_hash)
            if account is not None:
                return account
        return self.default_pool.get_account_from_hash(account_hash)
1310666
def get_account_details(self, account):
        
        result = {}
        try:
            luser = self._get_account(account.username)
            luser = preload(luser, database=self._database)
        except ObjectDoesNotExist:
            return result

        for i, j in luser.items():
            if i != 'userPassword' and j is not None:
                result[i] = j

        return result
635730
def get_cached_token(self):
        ''' 
        '''
        token_info = None
        if self.cache_path:
            try:
                f = open(self.cache_path)
                token_info_string = f.read()
                f.close()
                token_info = json.loads(token_info_string)

                if self.is_token_expired(token_info):
                    token_info = self.refresh_access_token(token_info['refresh_token'])

            except IOError:
                pass
        return token_info
1034326
function getAccount (queryOptions, { accountId }) {
  return sendQuery(
    queryOptions,
    queryHelper.addQuery(
      queryHelper.emptyQuery(),
      'getAccount',
      {
        accountId
      }
    ),
    (resolve, reject, responseName, response) => {
      if (responseName !== 'ACCOUNT_RESPONSE') {
        const error = JSON.stringify(response.toObject().errorResponse)
        return reject(new Error(`Query response error: expected=ACCOUNT_RESPONSE, actual=${responseName}\nReason: ${error}`))
      }

      const account = response.getAccountResponse().getAccount().toObject()
      resolve(account)
    }
  )
}
50065
def get_deposits(self, account_id, **params):
        """"""
        response = self._get('v2', 'accounts', account_id, 'deposits', params=params)
        return self._make_api_object(response, Deposit)
205472
function getAccountDetail (queryOptions, { accountId, key, writerId }) {
  return sendQuery(
    queryOptions,
    queryHelper.addQuery(
      queryHelper.emptyQuery(),
      'getAccountDetail',
      {
        accountId
      }
    ),
    (resolve, reject, responseName, response) => {
      if (responseName !== 'ACCOUNT_DETAIL_RESPONSE') {
        const error = JSON.stringify(response.toObject().errorResponse)
        return reject(new Error(`Query response error: expected=ACCOUNT_DETAIL_RESPONSE, actual=${responseName}\nReason: ${error}`))
      }

      const transactions = JSON.parse(response.getAccountDetailResponse().toObject().detail)
      resolve(transactions)
    }
  )
}
1325248
def account_pin(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/accounts/{0}/pin'.format(str(id))
        return self.__api_request('POST', url)
841171
public static Account retrieve(RequestOptions options) throws StripeException {
    return retrieve((Map<String, Object>) null, options);
  }
518819
def account_number
      return @account_number if @account_number

      begin
        my_arn = AWS::IAM.new(
          access_key_id: @access_key_id,
          secret_access_key: @secret_access_key
        ).client.get_user[:user][:arn]
      rescue AWS::IAM::Errors::AccessDenied => e
        my_arn = e.message.split[1]
      end

      @account_number = my_arn.split(':')[4]
    end
824528
def get_account_config(self, id_or_name):
        
        if id_or_name in self._config:
            return self._config[id_or_name]
        if id_or_name in self._acct_name_to_id:
            return self._config[self._acct_name_to_id[id_or_name]]
        raise RuntimeError('ERROR: Unknown account ID or name')
463
def account_block(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/accounts/{0}/block'.format(str(id))
        return self.__api_request('POST', url)
1309811
def get_account(self, account_id, **params):
        """"""
        response = self._get('v2', 'accounts', account_id, params=params)
        return self._make_api_object(response, Account)