-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for user report settings template
* Added methods to handle User Report Settings Templates endpoints, reusing logic from existing Report Settings Templates methods. * Implemented tests to ensure the correct functionality of the newly added methods. * Created 4 JSON files for User Report Settings Templates, following the structure of existing Report Settings Templates.
- Loading branch information
”Andrei”
committed
Jan 22, 2025
1 parent
41a3912
commit 98b36b3
Showing
5 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/test/resources/api/reports/addUserReportSettingsTemplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "my report template", | ||
"currency": "USD", | ||
"unit": "strings", | ||
"config": { | ||
"regularRates": [ | ||
{ | ||
"mode": "no_match", | ||
"value": 0.1 | ||
} | ||
], | ||
"individualRates": [ | ||
{ | ||
"languageIds": [ | ||
"uk" | ||
], | ||
"userIds": [ | ||
20 | ||
], | ||
"rates": [ | ||
{ | ||
"mode": "tm_match", | ||
"value": 0.1 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/test/resources/api/reports/editUserReportSettingsTemplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"op": "replace", | ||
"path": "name", | ||
"value": "my report template" | ||
} | ||
] |
40 changes: 40 additions & 0 deletions
40
src/test/resources/api/reports/listUserReportSettingsTemplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"data": { | ||
"id": 1, | ||
"name": "my report template", | ||
"currency": "USD", | ||
"unit": "words", | ||
"config": { | ||
"regularRates": [ | ||
{ | ||
"mode": "tm_match", | ||
"value": 0.1 | ||
} | ||
], | ||
"individualRates": [ | ||
{ | ||
"languageIds": [ | ||
"uk" | ||
], | ||
"userIds": [], | ||
"rates": [ | ||
{ | ||
"mode": "tm_match", | ||
"value": 0.1 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"createdAt": "2019-09-23T11:26:54+00:00", | ||
"updatedAt": "2019-09-23T11:26:54+00:00" | ||
} | ||
} | ||
], | ||
"pagination": { | ||
"offset": 0, | ||
"limit": 25 | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/test/resources/api/reports/userReportSettingsTemplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"data": { | ||
"id": 1, | ||
"name": "my report template", | ||
"currency": "USD", | ||
"unit": "strings", | ||
"config": { | ||
"regularRates": [ | ||
{ | ||
"mode": "no_match", | ||
"value": 0.1 | ||
} | ||
], | ||
"individualRates": [ | ||
{ | ||
"languageIds": [ | ||
"uk" | ||
], | ||
"userIds": [ | ||
20 | ||
], | ||
"rates": [ | ||
{ | ||
"mode": "tm_match", | ||
"value": 0.1 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"createdAt": "2019-09-23T11:26:54+00:00", | ||
"updatedAt": "2019-09-23T11:26:54+00:00" | ||
} | ||
} |