Skip to content

Commit f1b587c

Browse files
committed
Patch / update plan item
1 parent 6f10f3d commit f1b587c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

billingstack/api/v1/resources.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,15 @@ def add_plan_item(merchant_id, plan_id, product_id):
472472
return models.PlanItem.from_db(row)
473473

474474

475+
@bp.patch('/merchants/<merchant_id>/plans/<plan_id>/items/<product_id>')
476+
@signature(models.PlanItem, str, str, str, body=models.PlanItem)
477+
def update_plan_item(merchant_id, plan_id, product_id, body):
478+
row = central_api.update_plan_item(
479+
request.environ['context'], plan_id, product_id, body.to_db())
480+
481+
return models.PlanItem.from_db(row)
482+
483+
475484
@bp.delete('/merchants/<merchant_id>/plans/<plan_id>/items/<product_id>')
476485
def delete_plan_item(merchant_id, plan_id, product_id):
477486
central_api.delete_plan_item(request.environ['context'],

0 commit comments

Comments
 (0)