AmericaSCORESBayArea / salesforce-data-api

This project is based on Mulesoft Dataweave and Salesforce to provide secure, reliable, API access for all the Scores apps and projects. It is hosted on Anypoint and acts as the transactional hub, in concert with the authentication API
3 stars 1 forks source link

Fix/209 GET /enrollments/{enrollmentId} #262

Closed TharunKumarReddyPolu closed 4 months ago

TharunKumarReddyPolu commented 4 months ago

Description:

Fixed the Issue GET /enrollments/{enrollmentId} with implementing a choice in the .xml flow as follows:

  1. Success flow: If post get payload is not null and size of payload is not equal to Zero, then return the payload and set the status code as 200 OK
  2. Error flow: otherwise, then set the payload message as Enrollment Not Found and status code as 404 Not Found and return.

Test Example:

GET {{base_url}}/enrollments/{enrollmentId}

Payload 1:

  GET {{base_url}}/enrollments/a0mU8000000hMriIAE

Payload 2:

  GET {{base_url}}/enrollments/a0mU8000000hNriIAE

Screenshots of Tests:

Payload 1:

image

Payload 2:

image