Skip to content

Commit

Permalink
Revert "support for flexible billing and usage records"
Browse files Browse the repository at this point in the history
This reverts commit 768bc57.
  • Loading branch information
ob-stripe committed Apr 14, 2018
1 parent 4d7a489 commit 49860ea
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 96 deletions.
1 change: 0 additions & 1 deletion stripe/api_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@
from stripe.api_resources.token import Token
from stripe.api_resources.topup import Topup
from stripe.api_resources.transfer import Transfer
from stripe.api_resources.usage_record import UsageRecord
24 changes: 0 additions & 24 deletions stripe/api_resources/usage_record.py

This file was deleted.

1 change: 0 additions & 1 deletion stripe/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ def load_object_classes():
api_resources.Token.OBJECT_NAME: api_resources.Token,
api_resources.Topup.OBJECT_NAME: api_resources.Topup,
api_resources.Transfer.OBJECT_NAME: api_resources.Transfer,
api_resources.UsageRecord.OBJECT_NAME: api_resources.UsageRecord,
}


Expand Down
48 changes: 0 additions & 48 deletions tests/api_resources/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,54 +39,6 @@ def test_is_creatable(self):
)
self.assertIsInstance(resource, stripe.Plan)

def test_is_creatable_metered(self):
resource = stripe.Plan.create(
amount=100,
currency='usd',
id='plan_id',
interval='month',
name='plan_name',
usage_type='metered',
)
self.assert_requested(
'post',
'/v1/plans'
)
self.assertIsInstance(resource, stripe.Plan)

def test_is_creatable_tiered(self):
resource = stripe.Plan.create(
currency='usd',
id='plan_id',
interval='month',
name='plan_name',
billing_scheme='tiered',
tiers=[
{"up_to": 123, "amount": 123}, {"up_to": 'inf', "amount": 312}
],
tiers_mode='volume',
)
self.assert_requested(
'post',
'/v1/plans'
)
self.assertIsInstance(resource, stripe.Plan)

def test_is_creatable_transform_usage(self):
resource = stripe.Plan.create(
amount=100,
currency='usd',
id='plan_id',
interval='month',
name='plan_name',
transform_usage={"divide_by": 100, "round": 'up'},
)
self.assert_requested(
'post',
'/v1/plans'
)
self.assertIsInstance(resource, stripe.Plan)

def test_is_saveable(self):
resource = stripe.Plan.retrieve(TEST_RESOURCE_ID)
resource.metadata['key'] = 'value'
Expand Down
22 changes: 0 additions & 22 deletions tests/api_resources/test_usage_record.py

This file was deleted.

0 comments on commit 49860ea

Please sign in to comment.