Skip to content

Commit

Permalink
Merge pull request #119 from recurly/gs-support_new_coupon_duration_a…
Browse files Browse the repository at this point in the history
…ttributes

adding support for new coupon duration attributes
  • Loading branch information
bhelx committed Jul 31, 2015
2 parents 7182c4d + 7f67eed commit 1fe164d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions recurly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures/coupon/created.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Location: https://api.recurly.com/v2/coupons/couponmock
<max_redemptions nil="nil"></max_redemptions>
<applies_to_all_plans type="boolean">true</applies_to_all_plans>
<created_at type="datetime">2011-09-19T19:01:21Z</created_at>
<duration>forever</duration>
<temporal_unit></temporal_unit>
<temporal_amount type="integer"></temporal_amount>
<discount_in_cents>
<USD type="integer">1000</USD>
</discount_in_cents>
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures/coupon/exists.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Content-Type: application/xml; charset=utf-8
<max_redemptions nil="nil"></max_redemptions>
<applies_to_all_plans type="boolean">true</applies_to_all_plans>
<created_at type="datetime">2011-09-19T19:01:21Z</created_at>
<duration>forever</duration>
<temporal_unit></temporal_unit>
<temporal_amount type="integer"></temporal_amount>
<discount_in_cents>
<USD type="integer">1000</USD>
</discount_in_cents>
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures/coupon/plan-coupon-created.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Location: https://api.recurly.com/v2/coupons/plancouponmock
<max_redemptions nil="nil"></max_redemptions>
<applies_to_all_plans type="boolean">true</applies_to_all_plans>
<created_at type="datetime">2011-09-19T19:01:21Z</created_at>
<duration>forever</duration>
<temporal_unit></temporal_unit>
<temporal_amount type="integer"></temporal_amount>
<discount_in_cents>
<USD type="integer">1000</USD>
</discount_in_cents>
Expand Down

0 comments on commit 1fe164d

Please sign in to comment.