cyverse-de / terrain

DE's main API entry-point service
Other
4 stars 9 forks source link

CORE-1840: add support for the paid subscription flag #264

Closed slr71 closed 1 year ago

slr71 commented 1 year ago

This change adds the paid subscription plans to the subscription creation and retrieval endpoints in terrain. For the subscription retrieval endpoints, the change consists of a new field in the response body. For the creation endpoints, the change includes new required fields.

For the POST /terrain/admin/qms/subscriptions endpoint, each subscription request must now contain a paid flag indicating whether or not the user paid for the subscription. Here's an example request body:

{
  "subscriptions": [
    {
      "username": "sarahr",
      "plan_name": "Commercial",
      "paid": false
    }
  ]
}

For the PUT /terrain/admin/qms/users/{username}/plan/{plan-name} endpoint, a new required query parameter was added.

slr71 commented 1 year ago

Thanks for the review!