CreditNote.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. class ChargeBee_CreditNote extends ChargeBee_Model
  3. {
  4. protected $allowed = array('id', 'customerId', 'subscriptionId', 'referenceInvoiceId', 'type', 'reasonCode',
  5. 'status', 'vatNumber', 'date', 'priceType', 'total', 'amountAllocated', 'amountRefunded', 'amountAvailable','refundedAt', 'subTotal', 'currencyCode', 'lineItems', 'discounts', 'taxes', 'lineItemTaxes','linkedRefunds', 'allocations');
  6. # OPERATIONS
  7. #-----------
  8. public static function retrieve($id, $env = null, $headers = array())
  9. {
  10. return ChargeBee_Request::send(ChargeBee_Request::GET, ChargeBee_Util::encodeURIPath("credit_notes",$id), array(), $env, $headers);
  11. }
  12. public static function all($params = array(), $env = null, $headers = array())
  13. {
  14. return ChargeBee_Request::sendListRequest(ChargeBee_Request::GET, ChargeBee_Util::encodeURIPath("credit_notes"), $params, $env, $headers);
  15. }
  16. public static function creditNotesForCustomer($id, $params = array(), $env = null, $headers = array())
  17. {
  18. return ChargeBee_Request::send(ChargeBee_Request::GET, ChargeBee_Util::encodeURIPath("customers",$id,"credit_notes"), $params, $env, $headers);
  19. }
  20. }
  21. ?>