Commit Graph

2883 Commits

Author SHA1 Message Date
Leo Hemsted
02e8f454e1 add new notification status 'sent'
for international text messages, when we may not ever receive callback info,
so we need a separate status that doesn't get timed out etc
2017-04-25 17:08:29 +01:00
Leo Hemsted
c87be0f982 add sent notification status 2017-04-25 16:29:07 +01:00
Martyn Inglis
e977e7cee4 Wired in a simple callback to handle SNS notifications from S3
S3 will send a message when a file lands - which will trigger processing of DVLA responses.
2017-04-25 14:56:16 +01:00
Martyn Inglis
8e439ce58a Bumped utils version 2017-04-25 14:32:14 +01:00
Martyn Inglis
d4996aaf0e Merge branch 'master' into rate-limit-api-calls 2017-04-25 14:27:05 +01:00
Rebecca Law
a016a601c9 Merge pull request #916 from alphagov/update-sms-rate
Update sms rate
2017-04-25 11:06:23 +01:00
Rebecca Law
3b28a1fa47 Fix db migration merge conflicts 2017-04-25 10:19:57 +01:00
Rebecca Law
e8a7762688 Merge branch 'master' into update-sms-rate 2017-04-25 10:15:54 +01:00
Martyn Inglis
803c21865b Allow rate limiting on a per env basis
- switched off on prod by default
2017-04-25 09:54:09 +01:00
Rebecca Law
6c8ff80440 Rename class to be singular 2017-04-25 09:53:43 +01:00
Imdad Ahad
2c620ed652 Merge pull request #915 from alphagov/fix-get-current-provider-returns-inactive
Fix: Ensure get_current_provider returns an active provider
2017-04-24 16:33:12 +01:00
Rebecca Law
266c17dfd6 Do not delete rates 2017-04-24 16:32:23 +01:00
Rebecca Law
43226dc932 Added a new rates table.
We only need one rate per channel. This reflects that. The provider_rates has been left for now, it is still not being used.
New dao has been added to select the right rate for the given notification_type and date of notificaiton.
2017-04-24 16:20:03 +01:00
Imdad Ahad
ce2401c6e0 Ensure get_current_provider only returns active 2017-04-24 16:06:14 +01:00
Martyn Inglis
926b8a60f9 Adds in call to new rate limit method in the redis client
- both V1 and V2 APIs
- Rate limiting wrapped into a new method - check_rate_limiting
	- delegates to the previous daily limit and the new though put limit
- Rate limiting done on key type. Each key has it's own limit (number of requests) and interval (time period of requests)
- Configured in the config. Not done on a per-env basis though could be in the future.
2017-04-24 14:15:08 +01:00
kentsanggds
8712b6aa03 Merge pull request #913 from alphagov/international-feature-db-migration
Add international sms feature flag in db
2017-04-24 14:10:33 +01:00
Ken Tsang
aed9bc0fe7 Added tests for international sms flag 2017-04-24 13:01:13 +01:00
Ken Tsang
04796b39a8 Add international sms feature flag in db 2017-04-24 12:43:19 +01:00
Chris Hill-Scott
028cedbb10 Merge pull request #912 from alphagov/revert-909-revert-906-dvla-orgs
Revert "Revert "add DVLA organisations to API""
2017-04-21 16:41:06 +01:00
Imdad Ahad
c4fac1d937 Revert "Revert "add DVLA organisations to API"" 2017-04-21 16:05:07 +01:00
Imdad Ahad
4c764dcc80 Merge pull request #911 from alphagov/add-dvla-org-migration
Add DVLA org migration with default values
2017-04-21 16:04:42 +01:00
minglis
8d4f9813f8 Merge pull request #907 from alphagov/upper-case-dvla-ids
Upper case only in the random notification id generator
2017-04-21 14:26:03 +01:00
Imdad Ahad
0ce0086639 Add DVLA org migration with default values 2017-04-21 13:27:04 +01:00
Imdad Ahad
6c703840c2 Merge pull request #908 from alphagov/feat-prepare-formatted-csv-notification
Make API responsible formatting notifications for CSV
2017-04-21 13:01:20 +01:00
Imdad Ahad
49fb4823e3 Refactor tests 2017-04-21 11:07:45 +01:00
Leo Hemsted
4a82230eaa Merge pull request #909 from alphagov/revert-906-dvla-orgs
Revert "add DVLA organisations to API"
2017-04-20 18:23:49 +01:00
Leo Hemsted
c3e56d5d2d Revert "add DVLA organisations to API" 2017-04-20 18:21:56 +01:00
Leo Hemsted
95b3248a5e Merge pull request #906 from alphagov/dvla-orgs
add DVLA organisations to API
2017-04-20 17:41:27 +01:00
Leo Hemsted
76676280ab add create service tests for dvla_org 2017-04-20 17:22:45 +01:00
Leo Hemsted
f127bac600 add GET /dvla_organisation endpoint 2017-04-20 15:35:31 +01:00
Imdad Ahad
4dfd5448ad Make get all notications return in csv format too:
* This adds functionality (via an extra req param) to the
* existing get all notifications method allowing us to specify
* when we want the API to return in csv/non-csv format
2017-04-20 12:31:49 +01:00
Chris Hill-Scott
5720f056ee Pass DVLA organisation ID through to Template
So that we know which organisation ID to spit out in the file.
2017-04-20 12:06:51 +01:00
Imdad Ahad
9fbd43c072 Serialise notifications for csv separately:
* Introduces separate method on Notification to serialise the notification
* ready for csv output
* Fixes issue where job_row_number = 0 not being accounted for correctly
2017-04-20 11:52:00 +01:00
Martyn Inglis
5550201939 Upper case only in the random notification id generator
as DVLA need upper case only or the barcode doesn't generate.
2017-04-20 10:55:53 +01:00
Leo Hemsted
d514d99a67 add DVLA organisations to API
when services are created, they'll have a dvla_org_id of 001, or
HM Government. That can be changed later using a regular update call
2017-04-19 16:31:18 +01:00
Leo Hemsted
67002cd608 Merge pull request #905 from alphagov/letter-scheduled-task
exclude letters from scheduled cleanup tasks
2017-04-19 16:19:44 +01:00
Leo Hemsted
935e566284 add tests for letters not getting excluded 2017-04-19 14:22:25 +01:00
kentsanggds
45a689f98e Merge pull request #904 from alphagov/remove-slash-in-route
Removed slash from v2 get all templates route
2017-04-19 12:52:04 +01:00
Ken Tsang
4a63a337b2 Removed slash from v2 get all templates route 2017-04-19 12:38:58 +01:00
Leo Hemsted
b381aeefa1 don't include letters when timing out/deleting old notifications
also refactored those functions, since they were pretty gnarly and
repeated themselves a lot
2017-04-19 11:34:00 +01:00
kentsanggds
d51fbf49e6 Merge pull request #903 from alphagov/add-v2-template-get-all
Add v2 template get all
2017-04-19 11:09:57 +01:00
Ken Tsang
fc0cfa5dbf Corrected code to handle template types 2017-04-19 10:51:12 +01:00
Ken Tsang
ed953e992d Add check for subject when email type 2017-04-19 10:51:12 +01:00
Ken Tsang
c33b876c66 Remove get all template print 2017-04-19 10:51:12 +01:00
Ken Tsang
5ef0ecf9bf Added subject to get all templates email template 2017-04-19 10:51:12 +01:00
Ken Tsang
a5e514c356 Refactored to use template response as template 2017-04-19 10:51:12 +01:00
Ken Tsang
d290a2e0ad Removed paging from get all templates 2017-04-19 10:51:12 +01:00
Ken Tsang
e2ad8ba50d Renamed get template test 2017-04-19 10:51:12 +01:00
Ken Tsang
cb7cd233d1 Rrefactored schema 2017-04-19 10:51:12 +01:00
Ken Tsang
89e244ccd2 First commit 2017-04-19 10:51:12 +01:00