зеркало из https://github.com/mozilla/subhub.git
Refactor subhub_api.yaml, payments.py: Update API response formatting
Updated references of 'nickname' to be 'plan_name' to allow for consistency in our responses
This commit is contained in:
Родитель
d3a1ef36cc
Коммит
2ac45495c4
|
@ -211,7 +211,7 @@ def create_return_data(subscriptions) -> JsonDict:
|
|||
"current_period_end": subscription["current_period_end"],
|
||||
"current_period_start": subscription["current_period_start"],
|
||||
"ended_at": subscription["ended_at"],
|
||||
"nickname": subscription["plan"]["nickname"],
|
||||
"plan_name": subscription["plan"]["nickname"],
|
||||
"plan_id": subscription["plan"]["id"],
|
||||
"status": subscription["status"],
|
||||
"subscription_id": subscription["id"],
|
||||
|
@ -236,7 +236,7 @@ def create_subscription_object_without_failure(subscription: object) -> object:
|
|||
"current_period_end": subscription["current_period_end"],
|
||||
"current_period_start": subscription["current_period_start"],
|
||||
"ended_at": subscription["ended_at"],
|
||||
"nickname": subscription["plan"]["nickname"],
|
||||
"plan_name": subscription["plan"]["nickname"],
|
||||
"plan_id": subscription["plan"]["id"],
|
||||
"status": subscription["status"],
|
||||
"subscription_id": subscription["id"],
|
||||
|
@ -317,7 +317,7 @@ def create_update_data(customer) -> dict:
|
|||
"current_period_end": subscription["current_period_end"],
|
||||
"current_period_start": subscription["current_period_start"],
|
||||
"ended_at": subscription["ended_at"],
|
||||
"nickname": subscription["plan"]["nickname"],
|
||||
"plan_name": subscription["plan"]["nickname"],
|
||||
"plan_id": subscription["plan"]["id"],
|
||||
"status": subscription["status"],
|
||||
"subscription_id": subscription["id"],
|
||||
|
|
|
@ -363,7 +363,7 @@ definitions:
|
|||
currency:
|
||||
type: string
|
||||
example: usd
|
||||
nickname:
|
||||
plan_name:
|
||||
type: string
|
||||
example: Monthly Rocket Launches
|
||||
Subscriptions:
|
||||
|
@ -377,7 +377,7 @@ definitions:
|
|||
plan_id:
|
||||
type: string
|
||||
example: pro_basic_823
|
||||
nickname:
|
||||
plan_name:
|
||||
type: string
|
||||
example: "pro_basic"
|
||||
current_period_end:
|
||||
|
|
Загрузка…
Ссылка в новой задаче