diff --git a/recurly/__init__.py b/recurly/__init__.py
index 260e041d..9eea8f74 100644
--- a/recurly/__init__.py
+++ b/recurly/__init__.py
@@ -1582,6 +1582,7 @@ class Plan(Resource):
'updated_at',
'tax_exempt',
'tax_code',
+ 'vertex_transaction_type',
'unit_amount_in_cents',
'setup_fee_in_cents',
'total_billing_cycles',
diff --git a/tests/fixtures/plan/created.xml b/tests/fixtures/plan/created.xml
index c4cbfbb5..147d0276 100644
--- a/tests/fixtures/plan/created.xml
+++ b/tests/fixtures/plan/created.xml
@@ -22,6 +22,7 @@ Content-Type: application/xml; charset=utf-8
1000
+ rental
HTTP/1.1 201 Created
@@ -48,6 +49,7 @@ Location: https://api.recurly.com/v2/plans/planmock
days
10
2011-10-03T22:23:12Z
+ rental
1000
diff --git a/tests/fixtures/plan/show-taxed.xml b/tests/fixtures/plan/show-taxed.xml
index 6de069ef..41ef0477 100644
--- a/tests/fixtures/plan/show-taxed.xml
+++ b/tests/fixtures/plan/show-taxed.xml
@@ -28,6 +28,7 @@ Content-Type: application/xml; charset=utf-8
days
2011-10-03T22:23:12Z
true
+ sale
diff --git a/tests/fixtures/plan/updated.xml b/tests/fixtures/plan/updated.xml
index 5c66d0c2..6fabde96 100644
--- a/tests/fixtures/plan/updated.xml
+++ b/tests/fixtures/plan/updated.xml
@@ -16,6 +16,7 @@ Content-Type: application/xml; charset=utf-8
2000
+ sale
HTTP/1.1 200 OK
@@ -41,6 +42,7 @@ Content-Type: application/xml; charset=utf-8
days
Setup Fee AC
2011-10-03T22:23:12Z
+ sale
2000
diff --git a/tests/test_resources.py b/tests/test_resources.py
index 28e36329..0fc4aab4 100644
--- a/tests/test_resources.py
+++ b/tests/test_resources.py
@@ -2073,6 +2073,7 @@ def test_plan(self):
unit_amount_in_cents=Money(1000),
total_billing_cycles=10,
custom_fields=[CustomField(name='food', value='pizza')],
+ vertex_transaction_type='rental'
)
with self.mock_request('plan/created.xml'):
plan.save()
@@ -2082,6 +2083,7 @@ def test_plan(self):
self.assertIsInstance(plan.custom_fields[0], CustomField)
self.assertEqual(plan.custom_fields[0].name, 'food')
self.assertEqual(plan.custom_fields[0].value, 'pizza')
+ self.assertEqual(plan.vertex_transaction_type, 'rental')
with self.mock_request('plan/exists.xml'):
same_plan = Plan.get(plan_code)
@@ -2094,6 +2096,7 @@ def test_plan(self):
plan.unit_amount_in_cents = Money(USD=2000)
plan.setup_fee_in_cents = Money(USD=200)
plan.setup_fee_accounting_code = 'Setup Fee AC'
+ plan.vertex_transaction_type = 'sale'
with self.mock_request('plan/updated.xml'):
plan.save()
finally:
@@ -2104,6 +2107,7 @@ def test_plan(self):
with self.mock_request('plan/show-taxed.xml'):
plan = Plan.get(plan_code)
self.assertTrue(plan.tax_exempt)
+ self.assertEqual(plan.vertex_transaction_type, 'sale')
def test_plan_with_ramps(self):
plan_code = 'plan%s' % self.test_id
@@ -2290,7 +2294,7 @@ def test_subscription_change_proration(self):
assert isinstance(manualsub.proration_settings, ProrationSettings)
ElementTree.tostring(account.to_element(), encoding='UTF-8')
-
+
def test_subscription_with_plan_ramp(self):
plan_code = 'plan%s' % self.test_id