Microservice responsible for the print suppression preference of a customer.
Please note that the integration tests do NOT run in the pipeline at this time.
Ensure you have service-manager python environment setup:
source ../servicemanager/bin/activate
Format:
sbt fmt
Then run the tests and coverage report:
sbt clean coverage test coverageReport
If your build fails due to poor testing coverage, DO NOT lower the test coverage, instead inspect the generated report located here on your local repo: /target/scala-2.12/scoverage-report/index.html
Then run the integration tests:
sbt it:test
| Path | Supported Methods | Description | 
|---|---|---|
| /preferences/sa/individual/print-suppression | GET | The tax identifiers of all customers whose print may be suppressed, together with the form identifiers which may be suppressed for them More... | 
The tax identifiers of all customers whose print may be suppressed, together with the form identifiers which may be suppressed for them. Accepts parameters:
| Name | Description | 
|---|---|
| updated-on | Mandatory field. Limits the response to preferences changed on a given date. Must be a date in the past formatted as yyyy-mm-dd. | 
| limit | Limits number of preferences per response. Must be an integer between 0 and 20000. If not supplied, defaults to 20,000 | 
Example URL: /preferences/sa/individual/print-suppression?updated-on=2013-12-30&limit=100
Responds with status:
- 200with a response body if the request was successful
- 400if the parameters provided are invalid
Example response:
{
  "pages":3,
  "next":"/preferences/sa/individual/print-suppression?updated-on=2013-12-30&offset=1234&limit=100",
  "updates":[
    {"id":"12345678","idType":"utr","formIds":[]},
    {"id":"10000000","idType":"utr","formIds":[]},
    {"id":"10000001","idType":"utr","formIds":["ABC","123","XYZ"]},
    [...]
  ]
}The next property gives the URL of the next page of preferences, if available. Each item in updates gives an identifier along with the form IDs that may be suppressed for that customer.
| Path | Supported Methods | Description | 
|---|---|---|
| /preferences/sa/individual/print-suppression | POST | Insert or update a updated print preference record More... | 
Insert or update a updated print preference record
| Name | Description | 
|---|---|
| date | Mandatory field. The date the preference has been updated. Must be a date formatted as yyyy-mm-dd. | 
Example body:
{"id":"10000001","idType":"utr","formIds":["ABC","123","XYZ"]},Responds with status:
- 200when the record is inserted or updated successfully
- 500in any other case
This code is open source software licensed under the Apache 2.0 License.