Skip to content

Commit

Permalink
* * *
Browse files Browse the repository at this point in the history
** APIs added**:

Support to archive a coupon code. See archive Coupon code API here: https://apidocs.chargebee.com/docs/api/coupon_codes#archive_a_coupon_code

** APIs updated**:

The attribute for "status" is returned as part of Coupon Code resource. See : https://apidocs.chargebee.com/docs/api/coupon_codes#coupon_code_attributes
  • Loading branch information
SangeethaBaskaran committed May 2, 2016
1 parent 46b565a commit fa3f778
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
### v2.0.2 (2016-05-02)
* * *
** APIs added**:

Support to archive a coupon code. See archive Coupon code API here: https://apidocs.chargebee.com/docs/api/coupon_codes#archive_a_coupon_code

** APIs updated**:

The attribute "status" is returned as part of Coupon Code resource. See : https://apidocs.chargebee.com/docs/api/coupon_codes#coupon_code_attributes

### v2.0.1 (2016-04-29)
* * *

Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,9 +1,9 @@
# Chargebee PHP Client Library - API V2

[![Packagist](https://img.shields.io/packagist/dt/chargebee/chargebee-php.svg?maxAge=2592000)]()
[![Packagist](https://img.shields.io/packagist/dm/chargebee/chargebee-php.svg?maxAge=2592000)]()
[![Packagist](https://img.shields.io/packagist/v/chargebee/chargebee-php.svg?maxAge=2592000)]()
[![Packagist](https://img.shields.io/packagist/l/chargebee/chargebee-php.svg?maxAge=2592000)]()
[![Packagist](https://img.shields.io/packagist/v/chargebee/chargebee-php.svg?maxAge=2592000)](https://packagist.org/packages/chargebee/chargebee-php)
[![Packagist](https://img.shields.io/packagist/dt/chargebee/chargebee-php.svg?maxAge=2592000)](https://packagist.org/packages/chargebee/chargebee-php/stats)
[![Packagist](https://img.shields.io/packagist/dm/chargebee/chargebee-php.svg?maxAge=2592000)](https://packagist.org/packages/chargebee/chargebee-php/stats)
[![Packagist](https://img.shields.io/packagist/l/chargebee/chargebee-php.svg?maxAge=2592000)](https://packagist.org/packages/chargebee/chargebee-php)

This is the PHP Library for integrating with Chargebee. Sign up for a Chargebee account [here](https://www.chargebee.com).

Expand Down
7 changes: 6 additions & 1 deletion lib/ChargeBee/Models/CouponCode.php
Expand Up @@ -3,7 +3,7 @@
class ChargeBee_CouponCode extends ChargeBee_Model
{

protected $allowed = array('code', 'couponId', 'couponSetName'
protected $allowed = array('code', 'status', 'couponId', 'couponSetName'
);


Expand All @@ -21,6 +21,11 @@ public static function retrieve($id, $env = null, $headers = array())
return ChargeBee_Request::send(ChargeBee_Request::GET, ChargeBee_Util::encodeURIPath("coupon_codes",$id), array(), $env, $headers);
}

public static function archive($id, $env = null, $headers = array())
{
return ChargeBee_Request::send(ChargeBee_Request::POST, ChargeBee_Util::encodeURIPath("coupon_codes",$id,"archive"), array(), $env, $headers);
}

}

?>
2 changes: 1 addition & 1 deletion lib/ChargeBee/Version.php
Expand Up @@ -2,7 +2,7 @@

final class ChargeBee_Version
{
const VERSION = '2.0.1';
const VERSION = '2.0.2';
}

?>

0 comments on commit fa3f778

Please sign in to comment.