From 7f67eed1ec0e2ed29b80673adee99bc0b46ba9ec Mon Sep 17 00:00:00 2001 From: Garett Shulman Date: Fri, 26 Jun 2015 14:31:55 -0600 Subject: [PATCH] adding support for new coupon duration attributes --- CHANGELOG | 3 +++ recurly/__init__.py | 3 +++ tests/fixtures/coupon/created.xml | 3 +++ tests/fixtures/coupon/exists.xml | 3 +++ tests/fixtures/coupon/plan-coupon-created.xml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index d1948c65..05464997 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ - Require a version of six library >= 1.4.0 - Add `tax_exempt`, `tax_code`, `accounting_code` to `Transaction` +- Add `duration` to `Coupon` +- Add `temporal_unit` to `Coupon` +- Add `temporal_amount` to `Coupon` ## Version 2.2.12 June 25, 2015 diff --git a/recurly/__init__.py b/recurly/__init__.py index 428cd9d0..97ca6422 100644 --- a/recurly/__init__.py +++ b/recurly/__init__.py @@ -309,6 +309,9 @@ class Coupon(Resource): 'invoice_description', 'single_use', 'applies_for_months', + 'duration', + 'temporal_unit', + 'temporal_amount', 'max_redemptions', 'applies_to_all_plans', 'created_at', diff --git a/tests/fixtures/coupon/created.xml b/tests/fixtures/coupon/created.xml index 9e7a204e..ea26d2e8 100644 --- a/tests/fixtures/coupon/created.xml +++ b/tests/fixtures/coupon/created.xml @@ -33,6 +33,9 @@ Location: https://api.recurly.com/v2/coupons/couponmock true 2011-09-19T19:01:21Z + forever + + 1000 diff --git a/tests/fixtures/coupon/exists.xml b/tests/fixtures/coupon/exists.xml index 37ce0efe..156ffabd 100644 --- a/tests/fixtures/coupon/exists.xml +++ b/tests/fixtures/coupon/exists.xml @@ -20,6 +20,9 @@ Content-Type: application/xml; charset=utf-8 true 2011-09-19T19:01:21Z + forever + + 1000 diff --git a/tests/fixtures/coupon/plan-coupon-created.xml b/tests/fixtures/coupon/plan-coupon-created.xml index b30b8e3a..c4118df9 100644 --- a/tests/fixtures/coupon/plan-coupon-created.xml +++ b/tests/fixtures/coupon/plan-coupon-created.xml @@ -34,6 +34,9 @@ Location: https://api.recurly.com/v2/coupons/plancouponmock true 2011-09-19T19:01:21Z + forever + + 1000