Skip to content

Commit

Permalink
Merge pull request #108 from recurly/tax_info_on_charges
Browse files Browse the repository at this point in the history
Add 'tax_type', 'tax_region', 'tax_rate' to Adjustments
  • Loading branch information
bhelx committed Mar 23, 2015
2 parents 37561ff + 08cde62 commit 74d0268
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Add `tax_type`, `tax_rate`, `tax_region` to `Adjustment`

## Version 2.2.9 February 6, 2015

- Added `original_adjustment()` to `Adjustment` for retrieving the linked
Expand Down
3 changes: 3 additions & 0 deletions recurly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ class Adjustment(Resource):
'unit_amount_in_cents',
'discount_in_cents',
'tax_in_cents',
'tax_type',
'tax_region',
'tax_rate',
'total_in_cents',
'currency',
'tax_exempt',
Expand Down
3 changes: 3 additions & 0 deletions tests/fixtures/adjustment/account-has-adjustments.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ X-Records: 1
<description>test charge</description>
<account_code>chargemock</account_code>
<tax_in_cents type="integer">5000</tax_in_cents>
<tax_type>usst</tax_type>
<tax_region>CA</tax_region>
<tax_rate type="float">0.0875</tax_rate>
<unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
<currency>USD</currency>
<tax_details type="array">
Expand Down
3 changes: 3 additions & 0 deletions tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ def test_charge(self):
same_charge = charges[0]
self.assertEqual(same_charge.unit_amount_in_cents, 1000)
self.assertEqual(same_charge.tax_in_cents, 5000)
self.assertEqual(same_charge.tax_type, 'usst')
self.assertEqual(same_charge.tax_rate, 0.0875)
self.assertEqual(same_charge.tax_region, 'CA')
self.assertEqual(same_charge.currency, 'USD')
self.assertEqual(same_charge.description, 'test charge')
self.assertEqual(same_charge.type, 'charge')
Expand Down

0 comments on commit 74d0268

Please sign in to comment.