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:
Jackie Munroe 2019-06-03 10:18:41 -07:00 коммит произвёл Scott Idler
Родитель d3a1ef36cc
Коммит 2ac45495c4
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -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: