CouponCode.php 839 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. class ChargeBee_CouponCode extends ChargeBee_Model
  3. {
  4. protected $allowed = array('code', 'status', 'couponId', 'couponSetName'
  5. );
  6. # OPERATIONS
  7. #-----------
  8. public static function create($params, $env = null, $headers = array())
  9. {
  10. return ChargeBee_Request::send(ChargeBee_Request::POST, ChargeBee_Util::encodeURIPath("coupon_codes"), $params, $env, $headers);
  11. }
  12. public static function retrieve($id, $env = null, $headers = array())
  13. {
  14. return ChargeBee_Request::send(ChargeBee_Request::GET, ChargeBee_Util::encodeURIPath("coupon_codes",$id), array(), $env, $headers);
  15. }
  16. public static function archive($id, $env = null, $headers = array())
  17. {
  18. return ChargeBee_Request::send(ChargeBee_Request::POST, ChargeBee_Util::encodeURIPath("coupon_codes",$id,"archive"), array(), $env, $headers);
  19. }
  20. }
  21. ?>