Richard Chapman
068ecd80a1
Changes after review. Style changes to ensure consistency with the rest of the code base to ensure good maintainability in future.
2017-10-05 16:50:18 +01:00
Richard Chapman
7974e59eb7
Changes after review. Updates to style and import order to be more consistent with other code.
...
Added clarification to an error message to give better debugging information.
Removed using dao_get_reply_to_by_service_id in tests to be more consistent with other code and use the test db functions or remove the need for a call altogether making the code less complex.
2017-10-05 16:50:18 +01:00
Richard Chapman
d2168b7985
Added the mapping between notification and reply to email to the database and persisted the mapping when the request is received by the end point. the end point also checks if the reply to email id exists and if not returns an error. Also added tests to test the functionality.
2017-10-05 16:50:17 +01:00
venusbb
212ce302c8
Add get letter contact by id endpoint
...
Added the GET /<uuid:service_id>/letter-contact/<uuid:letter_contact_id>
endpoint for returning a letter contact for a service with the letter contact id
Added the DAO for returning a letter contact by id
2017-10-04 12:26:38 +01:00
Katie Smith
1fa1ebb96f
Add endpoint to return all letter contact blocks
...
Added the GET '/<uuid:service_id>/letter-contact' endpoint for returning
all letter contact blocks for a service.
Updated the DAO for service letter contacts to return the default letter
contact first.
2017-10-04 11:26:27 +01:00
venusbb
9a5addb896
Reverse codes that uses filtering of trial mode services
2017-10-02 12:00:52 +01:00
Katie Smith
f90a10ab38
Merge pull request #1277 from alphagov/imdad-katie-store-multiple-letter-contacts
...
[2/4] Upsert into ServiceLetterContact table when updating a service
2017-10-02 10:23:20 +01:00
Leo Hemsted
aaadf09562
add tests for new sched task
2017-09-26 12:03:06 +01:00
Leo Hemsted
b1928b928c
update process_letter tests
2017-09-26 11:28:54 +01:00
Leo Hemsted
f3db920c71
remove jobs from letter api calls
...
we now no longer create a job. At the end of the post there is no
action, as we don't have any tasks to queue immediately - if it's a
real notification it'll get picked up in the evening scheduled task.
If it's a test notification, we create it with an initial status of
sending so that we can be sure it'll never get picked up - and then we
trigger the update-letter-notifications-to-sent-to-dvla task to sent
the sent-at/by.
2017-09-26 09:57:36 +01:00
Leo Hemsted
17ba8db97f
remove jobs from letter api and make success/error ftp callback tasks
...
1. No longer create jobs when creating letters from api 🎉
2. Bulk update notifications based on the notification references after
we send them to DVLA - either as success or as error
2017-09-26 09:57:35 +01:00
Leo Hemsted
7dd3c1df5a
set letter notifications to pending while notify-ftp does its stuff
...
this means that if the task is accidentally ran twice (eg we autoscale
notify-celery-worker-beat to 2), it won't send letters twice.
Additionally, update some function names and config variables to make
it clear that they are referring to letter jobs, rather than all letter
content
2017-09-26 09:57:35 +01:00
Imdad Ahad
3977574ef1
Add methods to add/update letter contacts for a service that handle defaults properly
2017-09-25 15:46:01 +01:00
Rebecca Law
0fa16cc9d1
Merge pull request #1270 from alphagov/select-inbound-number-to-assign
...
Select an inbound number for a service
2017-09-25 14:17:36 +01:00
Imdad Ahad
fa3f4f3c20
Add dao to store letter contacts and upsert
2017-09-25 12:26:29 +01:00
Rebecca Law
64db8cb18d
Merge branch 'master' into select-inbound-number-to-assign
2017-09-25 11:13:12 +01:00
venusbb
34430ac97e
tidy up codes and tests
2017-09-25 09:44:16 +01:00
venusbb
da21248dcf
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-platform-admin-api
2017-09-22 11:14:09 +01:00
venusbb
d59a1f447a
Progress: Today stats completed
2017-09-22 11:05:36 +01:00
Rebecca Law
03ea09fd6a
Add order by in the dao_get_reply_to_by_service_id()
2017-09-22 10:02:59 +01:00
Rebecca Law
795bd4271c
New endpoint to fetch a single reply-to email address by id
2017-09-21 17:02:58 +01:00
Rebecca Law
18581c754a
Add new endpoint to get available inbound number.
...
Add new endpoint to allocate a specific number to a given service.
This will allow the platform admin user to choose a number when setting the inbound_sms permission for a service.
2017-09-21 15:18:52 +01:00
Rebecca Law
877d8a2877
Remove the default value - expect it to always be set.
2017-09-20 12:20:12 +01:00
Rebecca Law
c6bf38e869
- is_default is required on the add_service_email_reply_to_request schema
...
- Added check that the service exists for the POST reply-to methods.
- Added tests
2017-09-20 11:58:18 +01:00
venusbb
13c78d9b9d
code style changed
2017-09-15 15:00:13 +01:00
venusbb
9de7ae11e8
filter the Notifications result by trial_service_mode
2017-09-15 14:40:56 +01:00
Rebecca Law
6b2c2962c9
New endpoint to insert new service reply to email address and update existing one.
2017-09-14 17:54:38 +01:00
Rebecca Law
5366968cc9
Added some more tests
2017-09-14 12:23:52 +01:00
Katie Smith
72760550bd
Add endpoint to get the email reply to addresses for a service
...
- Changed the dao_get_reply_to_by_service_id method to return a list of
results.
- Added a GET /service/<service_id>/email-reply-to endpoint
2017-09-13 16:58:36 +01:00
Rebecca Law
5439b01a6e
When an inbound number is allocated insert or update a row in service_sms_senders.
2017-09-12 12:09:32 +01:00
Rebecca Law
f624f4f033
Insert and update methods for service_sms_sender
2017-09-11 17:40:37 +01:00
Katie Smith
01eef6c7f5
Add service_email_reply_to DAO with an upsert method
2017-09-08 14:56:05 +01:00
Imdad Ahad
3f34f8fa3e
Merge pull request #1222 from alphagov/get-performance-stats
...
Get performance stats
2017-08-31 14:17:42 +01:00
Imdad Ahad
72de309b26
Make perf platform processing stats query the NotificationHistory table
2017-08-31 12:52:59 +01:00
Katie Smith
49a6bfc06b
Send '0', not 'null', to perf platform if no notifications are sent
2017-08-30 16:02:30 +01:00
Imdad Ahad
af54d98faa
Remove unused imports
2017-08-30 14:40:54 +01:00
Imdad Ahad
c92b72da6e
Remove yearly billing data dao methods
2017-08-30 14:40:29 +01:00
Katie Smith
132d65bc75
Add query to get processing time stats for performance platform
...
We are only interested in API notifications, not including test
messages. Letters are not included.
2017-08-30 14:40:10 +01:00
kentsanggds
549601a6df
Merge pull request #1200 from alphagov/ken-refactor-inbound_numbers
...
Refactor inbound numbers
2017-08-25 13:27:16 +01:00
Rebecca Law
f9ee8bba91
Merge pull request #1209 from alphagov/remove-unused-endpoint
...
Removed unused endpoint and dao methods.
2017-08-24 16:32:37 +01:00
Rebecca Law
17f62723fa
Removed unused endpoint and dao methods.
2017-08-24 16:09:48 +01:00
Ken Tsang
1b35731fb2
Refactor code
...
- updated dao_get_letter_jobs_by_status to dao_get_letter_job_ids_by_status to return array of strings
2017-08-24 11:57:46 +01:00
Ken Tsang
d99ab329eb
Refactored code to use inbound_number.number
...
- Removed filter on sms_sender for `dao_fetch_services_by_inbound_number`
2017-08-23 14:14:32 +01:00
Ken Tsang
18881cd580
Add scheduled letter jobs
2017-08-23 13:22:07 +01:00
Leo Hemsted
ae683cad6e
Merge pull request #1192 from alphagov/deps
...
update dependencies
2017-08-22 15:39:49 +01:00
Chris Hill-Scott
bdc935a8b1
Exclude test keys when searching by recipient
...
The activity page doesn’t show notifications sent with a test key.
However it _does_ when you search by recipient. This is confusing
and inconsistent.
2017-08-21 17:38:21 +01:00
Leo Hemsted
c2152f9cb8
remove billable-units endpoint
...
it wasn't used anywhere, and the return value changed when flask was upgraded
2017-08-21 10:57:15 +01:00
Imdad Ahad
58baa9919c
Merge pull request #1190 from alphagov/imdad-feat-get-monthly-usage-from-billing-table
...
Get monthly usage breakdown from the correct table
2017-08-18 14:21:12 +01:00
Imdad Ahad
2371c2c9a7
Add helper to get months for a financial year:
...
* No tests have been added as this was taken from the admin
where it is already tested thoroughly.
* TODO: Move to utils
2017-08-18 12:45:05 +01:00
Ken Tsang
5bb20e41b3
Update dao_fetch_services_by_ss_sender
2017-08-17 18:15:22 +01:00