obtasks/archive/bridge-779/story.md
2019-04-29 14:49:56 +01:00

2.5 KiB

Summary

As an Operator and creator of a request to pay, I want to cancel one my existing pending RTP's, so that I can prevent an RTP from continuing. I CANNOT cancel a RTP which is in a PAID or UNKNOWN state

Acceptance Criteria

  1. Successfully cancel a pending RTP

    Given there is an existing RTP where the PayeeID is my user id

    And I have authorization to use Bridge

    When I make a request to DELETE /rtps/{id}

    And the RTP is in a pending state

    Then RTP is marked in the database as cancelled

    And the request succeeds with a 200 status code

    And Subsequent calls to GET /rtps/{id} returns status code 400

    And relevent missing error message

  2. Invalid attempt to cancel RTP in non pending state

    Given there is an existing RTP where the PayeeID is my user id

    And I have authorization to use Bridge

    When I make a request to DELETE /rtps/{id}

    And the RTP is NOT in a pending state

    Then The request fails with a 400 status code

    And relevent error message

  3. Invalid attempt to cancel with no ID

    Given I have authorization to use Bridge

    When I make a request to DELETE /rtps

    Then The request fails with a 400 status code

    And relevent error message

  4. Invalid attempt to cancel RTP where I am NOT the Payee

    Given there is an existing RTP where the PayeeID is NOT my user id

    And I have authorization to use Bridge

    When I make a request to DELETE /rtps/{id}

    Then The request fails with a 400 status code

    And relevent missing error message

  5. Invalid attempt to cancel RTP that is already cancelled

    Given there is an existing RTP where the PayeeID is my user id

    And I have authorization to use Bridge

    When I make a request to DELETE /rtps/{id}

    And the RTP IS in a cancelled state

    Then The request fails with a 400 status code

    And relevent error message

  6. Compliance Logging

    Given that I have authorization to use Bridge

    When I make a request to DELETE /rtps/{id}

    Then Details of the request will be added to the compliance log.

    And This should include (where possible):

    • All standard fields in compliance log entries

    • RTP id

    • Success or failure of the update

  7. The wiki is updated

Swagger spec

E2E testing of swagger definition Implement controller Update wiki ( Logging Details ) Create automated tests Run automated tests Manual testing