add in flags to price currency (bug 902185)
This commit is contained in:
Родитель
29bdd69c86
Коммит
6e8faf095d
|
@ -153,6 +153,12 @@ class PriceCurrency(amo.models.ModelBase):
|
|||
region = models.IntegerField(default=1) # Default to worldwide.
|
||||
tier = models.ForeignKey(Price)
|
||||
|
||||
# If this should show up in the developer hub.
|
||||
dev = models.BooleanField(default=True)
|
||||
|
||||
# If this can currently accept payments from users.
|
||||
paid = models.BooleanField(default=True)
|
||||
|
||||
class Meta:
|
||||
db_table = 'price_currency'
|
||||
verbose_name = 'Price currencies'
|
||||
|
|
|
@ -485,7 +485,9 @@ Pay Tiers
|
|||
"tier": 26,
|
||||
"provider": 1,
|
||||
"currency": "USD",
|
||||
"id": 1225
|
||||
"id": 1225,
|
||||
"dev": true,
|
||||
"paid": true
|
||||
}, {
|
||||
"price": "0.69",
|
||||
"method": 2,
|
||||
|
@ -493,7 +495,9 @@ Pay Tiers
|
|||
"tier": 26,
|
||||
"provider": 1,
|
||||
"currency": "DE",
|
||||
"id": 1226
|
||||
"id": 1226,
|
||||
"dev": true,
|
||||
"paid": true
|
||||
}],
|
||||
"localized": {},
|
||||
"resource_uri": "/api/v1/webpay/prices/1/",
|
||||
|
@ -515,6 +519,11 @@ Pay Tiers
|
|||
:type provider: int
|
||||
:param pricePoint: this is the value used for in-app payments.
|
||||
:type pricePoint: string
|
||||
:param dev: if ``true`` the tier will be shown to the developer during
|
||||
app configuration.
|
||||
:type dev: boolean
|
||||
:param paid: if ``true`` this tier can be used for payments by users.
|
||||
:type paid: boolean
|
||||
:statuscode 200: successfully completed.
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE price_currency ADD COLUMN dev bool NOT NULL DEFAULT TRUE;
|
||||
ALTER TABLE price_currency ADD COLUMN paid bool NOT NULL DEFAULT TRUE;
|
Загрузка…
Ссылка в новой задаче