Принимает id счёта и отправляет задачу в очередь

@param integer $bill_id
517217
public static function emailToQueue($bill_id)
	{
		$bill = Bill::whereBillId($bill_id)->first();
		$merchant = $bill->merchant;

		Queue::connection('ff-qiwi-gate')->push('FintechFab\QiwiGate\Queue\SendEmail', array(
			'email'       => $merchant->email,
			'merchant_id' => $merchant->id,
			'bill_id'     => $bill->bill_id,
			'status'      => $bill->status,
			'amount'      => $bill->amount,
			'user'        => $bill->user,
			'prv_name'    => $bill->prv_name,
			'ccy'         => $bill->ccy,
			'comment'     => $bill->comment,
		));
	}
906966
public function editPriceRule($rule_id = null)
    {
        $this->setPriceRule($rule_id);
        $this->setTitleEditPriceRule();
        $this->setBreadcrumbEditPriceRule();

        $this->setData('price_rule', $this->data_rule);
        $this->setData('types', $this->price_rule->getTypes());
        $this->setData('triggers', $this->getTriggersPriceRule());
        $this->setData('currencies', $this->getCurrenciesPriceRule());

        $this->submitEditPriceRule();
        $this->outputEditPriceRule();
    }
843063
public function deleteTax($tax_id)
    {
        $idx = 0;
        foreach ($this->_taxes as $tax)
        {
            if ($tax["id"] == $tax_id)
            {
                unset($this->_taxes[$idx]);
            }
            $idx++;
        }
        return $this->_taxes;
    }
580444
public function getNewsHtml($card_id)
    {
        $url = "https://api.weixin.qq.com/card/mpnews/gethtml?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['card_id' => $card_id]);
    }
454450
public function actionIndexDelete($id=NULL)
	{
		$cards = $this->loadDashboardCards();
		$value = $cards->value;
		
		if (array_key_exists($id, $value))
			unset($value[$id]);

		$cards->value = CJSON::encode($value);
		
		if ($cards->save())
		{
			$newCard = $this->loadCardDetailsModel($id);
			if ($newCard->delete())
				return true;
		}
		throw new CHttpException(500, Yii::t('Api.card', 'Card could not be saved.'));
	}
155463
public function getInfo($card_id) {
        $card = $this->getCardInfo()->parameters([
            'card_id' => $card_id
        ])->json();
        if ($card['errcode'] == 0) {
            return $card['card'];
        }
        throw new \Exception($card['errmsg']);
    }
77128
public OvhBill order_orderId_bill_GET(Long orderId) throws IOException {
		String qPath = "/me/order/{orderId}/bill";
		StringBuilder sb = path(qPath, orderId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhBill.class);
	}
1039180
public function _id($_id = false)
    {

        $this->_id = $_id;

        $this->filter[] = ["term" => ["_id" => $_id]];

        return $this;
    }
600942
public function addTerm($term_id) {
    $term = ($term_id instanceof Term) ? $term_id : Term::findOrFail($term_id);

    $term_relation = [
      'term_id' => $term->id,
      'vocabulary_id' => $term->vocabulary_id,
    ];

    return $this->related()->save(new TermRelation($term_relation));
  }
708713
public function indexOrder($order_id)
    {
        $this->setOrder($order_id);
        $this->submitIndexOrder();
        $this->setTitleIndexOrder();
        $this->setBreadcrumbIndexOrder();

        $this->setData('order', $this->data_order);

        $this->setDataPanelLogsIndexOrder();
        $this->setDataPanelSummaryIndexOrder();
        $this->setDataPanelCommentIndexOrder();
        $this->setDataPanelCustomerIndexOrder();
        $this->setDataPanelComponentsIndexOrder();
        $this->setDataPanelPaymentAddressIndexOrder();
        $this->setDataPanelShippingAddressIndexOrder();

        $this->outputIndexOrder();
    }
948122
protected function check_object_id( $object_id ) {
		$term = get_term( $object_id );
		if ( ! $term ) {
			WP_CLI::error( "Could not find the term with ID {$object_id}." );
		}
		return $term->term_id;
	}
1255865
public function termGet(int $term_id)
    {
        $value = get_term_meta($term_id, $this->getName(), ! $this->getOption('multiple', false));

        if (! empty($value)) {
            $this->setValue($value);
        }
    }
49140
public static function calculateAmount($bill, $amountQuery)
	{
		//Берём общую сумму счёта
		$amountBill = $bill->amount;
		//Берём суммы прошлых возвратов
		$refundsBefore = Refund::whereBillId($bill->bill_id)->get();
		$amount_refund = 0;
		foreach ($refundsBefore as $one) {
			$amount_refund += $one->amount;
		}
		//Вычисляем возможную сумму возвтрата и отдаём её
		$rest = $amountBill - $amount_refund;
		$amount = ($amountQuery > $rest)
			? $rest
			: $amountQuery;

		return $amount;
	}
1366293
public function parse()
    {
        $bills = [];
        $billTemplate = new Bill(['scenario' => Bill::SCENARIO_CREATE]);

        $lines = explode("\n", $this->data);

        try {
            foreach ($lines as $line) {
                $line = trim($line);
                if ($line === '') {
                    continue;
                }

                $bills[] = $bill = clone $billTemplate;

                list($client, $time, $sum, $currency, $type, $label) = $this->splitLine($line);
                $quantity = 1;
                $bill->setAttributes(compact('client', 'time', 'sum', 'currency', 'type', 'label', 'quantity'));
                $bill->populateRelation('charges', []);
            }

            $this->resolveClients(ArrayHelper::getColumn($bills, 'client'));

            foreach ($bills as $bill) {
                $bill->time = \Yii::$app->formatter->asDatetime($this->resolveTime($bill->time), 'php:d.m.Y H:i:s');
                $bill->type = $this->resolveType($bill->type);
                $bill->client_id = $this->convertClientToId($bill->client);
            }
        } catch (InvalidValueException $e) {
            $this->addError('data', $e->getMessage());

            return false;
        }

        return empty($bills) ? false : $bills;
    }
314095
public function listAccountAddress($user_id)
    {
        $this->setUserAccountAddress($user_id);
        $this->actionAccountAddress();
        $this->setTitleListAccountAddress();
        $this->setBreadcrumbListAccountAddress();

        $this->setData('user', $this->data_user);
        $this->setData('addresses', $this->getListAccountAddress());

        $this->outputListAccountAddress();
    }
1253124
public function showSubscriber($subscriber_id)
		{
			$form_data = array(
				'subscriber_id' => $subscriber_id
			);
			$xml = $this->call('detail', $form_data);
			$subscriber_data = $xml->subscriber;

			$subscriber = new Subscriber;
			$subscriber
				->setSubscriberId((int)$subscriber_data->subscriber_id)
				->setEmail((string)$subscriber_data->email)
				->setFirstName((string)$subscriber_data->first)
				->setLastName((string)$subscriber_data->last)
				->setCompany((string)$subscriber_data->company)
				->setAddress1((string)$subscriber_data->address_1)
				->setAddress2((string)$subscriber_data->address_2)
				->setCity((string)$subscriber_data->city)
				->setState((string)$subscriber_data->state)
				->setZip((string)$subscriber_data->zip)
				->setCountry((string)$subscriber_data->country)
				->setPhone((string)$subscriber_data->phone)
				->setFax((string)$subscriber_data->fax);

			$list_ids = (array)explode(",", $subscriber_data->lists);
			$subscriber_lists = array();
			$subscription_details = $subscriber_data->subscription_details;

			foreach ($list_ids as $list_id) {
				$subscriber_list = New SubscriberList;
				$subscriber_list
					->setListId((int)$list_id)
					->setCreatedDate(date_create_from_format('m/d/y h:i A', $subscription_details->{'list_' . $list_id}->created_date))
					->setLastSent(date_create_from_format('m/d/y h:i A', $subscription_details->{'list_' . $list_id}->last_sent))
					->setSentFlag($subscription_details->{'list_' . $list_id}->sent_flag)
					->setFormat($subscription_details->{'list_' . $list_id}->format);
				$subscriber_lists[] = $subscriber_list;
			}
			$subscriber->setLists($subscriber_lists);

			return $subscriber;
		}
98140
public function getcardlist($openid, $card_id = '')
    {
        if (empty($openid)) {
            $this->setError('缺少openid');

            return false;
        }

        $queryStr           = [];
        $queryStr['openid'] = $openid;

        if (!empty($card_id)) {
            $queryStr['card_id'] = $card_id;
        }

        $this->apitype = 'card';
        $this->module  = 'user';
        $res           = $this->_post('getcardlist', $queryStr);

        return $res;
    }