本文整理汇总了PHP中Billrun_Factory::balance方法的典型用法代码示例。如果您正苦于以下问题:PHP Billrun_Factory::balance方法的具体用法?PHP Billrun_Factory::balance怎么用?PHP Billrun_Factory::balance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Billrun_Factory
的用法示例。
在下文中一共展示了Billrun_Factory::balance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBalance
/**
* Get subscriber balance information for the current month.
* @param type $subscriberId (optional)
* @param type $billrunKey (optional)
* @return boolean
*/
public function getBalance()
{
return Billrun_Factory::balance()->load($this->data['sid'], Billrun_Util::getNextChargeKey(time()));
}
示例2: createBalanceIfMissing
/**
* Create a subscriber entry if none exists. Uses an update query only if the balance doesn't exist
* @param type $subscriber
*/
protected static function createBalanceIfMissing($aid, $sid, $billrun_key, $plan_ref)
{
$balance = Billrun_Factory::balance(array('sid' => $sid, 'billrun_key' => $billrun_key));
if ($balance->isValid()) {
return $balance;
} else {
return Billrun_Balance::createBalanceIfMissing($aid, $sid, $billrun_key, $plan_ref);
}
}