As a product owner, I should be able to update the details of a rate type, so that I can fix old or inconsistent rate types.
Acceptance Criteria
GIVEN a product owner is editing a rate type in the desktop app
WHEN the app hits the rate-types/:id endpoint with a valid PATCH request, containing:-
The path parameter:
:id, the unique id of the rate type of which the details are edited.
And any of the following body parameters:
rate_type
THEN the app should receive a status 200AND in the response, the following information should be returned:
headers: {
error: 0,
message: "The specified item was updated successfully"
}
body: {}
Resources
Development URL: {Here goes a URL to the feature on development API}
Production URL: {Here goes a URL to the feature on production API}
Dev Notes
{Some complementary notes if necessary}
Testing Notes
Scenario 1: PATCH request is successful
Update a rate type with a PATCH request to /rate-types/:id endpoint
A subsequent GET request to /rate-types/:id endpoint should return a status code 200 and the rate type details with the updated information i.e. matching the initially sent body.
Scenario 2: PATCH request is forbidden
Send a PATCH request to /rate-types/:id endpoint using a contractor account token.
Ensure the response returns a 403 forbidden status code.
Summary
As a
product owner
, I should be able to update the details of a rate type, so that I can fix old or inconsistent rate types.Acceptance Criteria
GIVEN a
product owner
is editing a rate type in the desktop app WHEN the app hits therate-types/:id
endpoint with a valid PATCH request, containing:- The path parameter::id
, the unique id of the rate type of which the details are edited.And any of the following body parameters:
THEN the app should receive a status
200
AND in the response, the following information should be returned:Sample Request/Sample Response
Resources
Dev Notes
{Some complementary notes if necessary}
Testing Notes
Scenario 1: PATCH request is successful
/rate-types/:id
endpoint/rate-types/:id
endpoint should return a status code 200 and the rate type details with the updated information i.e. matching the initially sent body.Scenario 2: PATCH request is forbidden
/rate-types/:id
endpoint using acontractor
account token.