Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove - from names

  • Loading branch information...
commit a9f1a74c06435cf33b5173e165290a4c9922eced 1 parent 3978794
@andymckay andymckay authored
View
2  lib/bango/resources/billing.py
@@ -8,7 +8,7 @@
class CreateBillingConfigurationResource(Resource):
class Meta(Resource.Meta):
- resource_name = 'create-billing'
+ resource_name = 'billing'
list_allowed_methods = ['post']
def obj_create(self, bundle, request, **kwargs):
View
4 lib/bango/resources/simple.py
@@ -15,7 +15,7 @@ class Meta(SimpleResource.Meta):
class UpdateRatingResource(SimpleResource):
class Meta(SimpleResource.Meta):
- resource_name = 'update-rating'
+ resource_name = 'rating'
simple_form = UpdateRatingForm
simple_api = 'UpdateRating'
@@ -23,6 +23,6 @@ class Meta(SimpleResource.Meta):
class MakePremiumResource(SimpleResource):
class Meta(SimpleResource.Meta):
- resource_name = 'make-premium'
+ resource_name = 'premium'
simple_form = MakePremiumForm
simple_api = 'MakePremiumPerAccess'
View
6 lib/bango/tests/test_resources.py
@@ -186,7 +186,7 @@ def test_list_allowed(self):
def setUp(self):
super(TestBangoMarkPremium, self).setUp()
- self.list_url = self.get_list_url('make-premium')
+ self.list_url = self.get_list_url('premium')
def test_mark(self):
self.create()
@@ -212,7 +212,7 @@ def test_list_allowed(self):
def setUp(self):
super(TestBangoUpdateRating, self).setUp()
- self.list_url = self.get_list_url('update-rating')
+ self.list_url = self.get_list_url('rating')
def test_update(self):
self.create()
@@ -235,7 +235,7 @@ class TestCreateBillingConfiguration(SellerProductBangoBase):
def setUp(self):
super(TestCreateBillingConfiguration, self).setUp()
- self.list_url = self.get_list_url('create-billing')
+ self.list_url = self.get_list_url('billing')
def test_good(self):
self.create()
View
2  lib/transactions/models.py
@@ -96,7 +96,7 @@ def completed_paypal_transaction(sender, **kwargs):
@receiver(bango_create, dispatch_uid='transaction-create-bango')
def create_bango_transaction(sender, **kwargs):
- if sender.__class__._meta.resource_name != 'create-billing':
+ if sender.__class__._meta.resource_name != 'billing':
return
# Pull information from all the over the place.
View
6 samples/bango-basic.py
@@ -85,7 +85,7 @@ def call(url, method, data):
res = call(bango_product_uri, 'get', {})
print 'Making premium.'
-res = call('/bango/make-premium/', 'post', {
+res = call('/bango/premium/', 'post', {
'bango': '123',
'price': 1,
'currencyIso': 'CAD',
@@ -93,7 +93,7 @@ def call(url, method, data):
})
print 'Updating rating.'
-res = call('/bango/update-rating/', 'post', {
+res = call('/bango/rating/', 'post', {
'bango': '123',
'price': 1,
'rating': 'UNIVERSAL',
@@ -117,7 +117,7 @@ def call(url, method, data):
print ('Finance id %s to %s' % (old_financial_id, res['finance_person_id']))
print 'Request billing configuration.'
-call('/bango/create-billing/', 'post', {
+call('/bango/billing/', 'post', {
'pageTitle': 'yep',
'price_currency': 'CAD',
'price_amount': 1,
Please sign in to comment.
Something went wrong with that request. Please try again.