diff --git a/lib/recurly/redemption_list.php b/lib/recurly/redemption_list.php index ffab5484..b9f99f96 100644 --- a/lib/recurly/redemption_list.php +++ b/lib/recurly/redemption_list.php @@ -2,8 +2,18 @@ class Recurly_CouponRedemptionList extends Recurly_Pager { - public static function get($params = null, $client = null) { - $uri = self::_uriWithParams(Recurly_Client::PATH_COUPON_REDEMPTIONS, $params); + public static function getForAccount($accountCode, $params = null, $client = null) { + $uri = self::_uriWithParams(Recurly_Client::PATH_ACCOUNTS . '/' . rawurlencode($accountCode) . Recurly_Client::PATH_COUPON_REDEMPTIONS, $params); + return new self($uri, $client); + } + + public static function getForInvoice($invoiceNumber, $params = null, $client = null) { + $uri = self::_uriWithParams(Recurly_Client::PATH_INVOICES . '/' . rawurlencode($invoiceNumber) . Recurly_Client::PATH_COUPON_REDEMPTIONS, $params); + return new self($uri, $client); + } + + public static function getForSubscription($subscriptionUuid, $params = null, $client = null) { + $uri = self::_uriWithParams(Recurly_Client::PATH_SUBSCRIPTIONS . '/' . rawurlencode($subscriptionUuid) . Recurly_Client::PATH_COUPON_REDEMPTIONS, $params); return new self($uri, $client); } diff --git a/lib/recurly/unique_coupon_code_list.php b/lib/recurly/unique_coupon_code_list.php index fc5f9157..29a423f4 100644 --- a/lib/recurly/unique_coupon_code_list.php +++ b/lib/recurly/unique_coupon_code_list.php @@ -3,8 +3,8 @@ class Recurly_UniqueCouponCodeList extends Recurly_Pager { - public static function get($params = null, $client = null) { - $uri = self::_uriWithParams(Recurly_Client::PATH_UNIQUE_COUPONS, $params); + public static function get($couponCode, $params = null, $client = null) { + $uri = self::_uriWithParams(Recurly_Client::PATH_COUPONS . '/' . rawurlencode($couponCode) . Recurly_Client::PATH_UNIQUE_COUPONS, $params); return new self($uri, $client); }