Exemple #1
0
 /**
  * Gets nominal remaining value of all credit notes on this account, for the specified currency.
  *
  * NOTE: As with all API calls, this counts by default only the first 10 credit notes.
  * Override by passing into $options: array('records' => 100); or however many credit notes you expect is a reasonable upper limit.
  * @return int
  */
 public function getRemainingCreditForCurrency($currency = 'USD', $options = NULL, $customClient = NULL)
 {
     $creditNotes = $this->getCreditNotes($options, $customClient);
     return Bf_CreditNote::getRemainingCreditForCurrency($creditNotes, $currency);
 }
Exemple #2
0
 /**
  * Gets Bf_CreditNotes for this Bf_Invoice.
  * @return Bf_CreditNote[]
  */
 public function getCreditNotes($options = NULL, $customClient = NULL)
 {
     $invoiceID = Bf_Invoice::getIdentifier($this);
     return Bf_CreditNote::getForInvoice($invoiceID, $options, $customClient);
 }
Exemple #3
0
 /**
  * Issues this credit note to the specified Bf_Subscription
  * @param string ID of the subscription to which credit should be issued
  * @param string ID of the account to whom the subscription belongs
  * @return Bf_CreditNote The issued credit note returned by the API
  */
 public function issueToSubscription($subscriptionID)
 {
     $this->subscriptionID = $subscriptionID;
     return Bf_CreditNote::create($this);
 }