Leo Hemsted
c863b33c8d
make sure letters are handled properly by the v1 api
2017-08-25 16:47:17 +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
717c0510a3
Merge pull request #1202 from alphagov/v1-send-letter-error-msg
...
Added a proper error response if the notification type is not supported.
2017-08-24 16:31:21 +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
451c5a9f1a
Made celery task arg a tuple
2017-08-23 18:05:48 +01:00
Rebecca Law
d4422dd35f
Added a proper error response if the notification type is not supported.
2017-08-23 14:56:03 +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
fb2623962f
Moved create_inbound after dao_create_service
...
- Need to do this otherwise no service.id is available to link the servce to the inbound number
2017-08-23 14:03:41 +01:00
Ken Tsang
665420402e
Improved code style
2017-08-23 13:22:07 +01:00
Ken Tsang
4fb5e68ce7
Refactor code
...
- Created TaskNames for DVLA_FILES rather than have DVLA_FILES in QueueNames
- Removed PROCESS_FTP from all_queues() as this was causing problems in picking up letter job tasks
- Created test to ensure that we don't arbitrarily add queue names to all_queues
2017-08-23 13:22:07 +01:00
Ken Tsang
b2b74e2b5d
Fixed bug in letter job schedule
2017-08-23 13:22:07 +01:00
Ken Tsang
bd79a6f770
Improved tests on letter jobs by status
2017-08-23 13:22:07 +01:00
Ken Tsang
18881cd580
Add scheduled letter jobs
2017-08-23 13:22:07 +01:00
Ken Tsang
8c4a084a0d
Refactor letters filename
2017-08-23 13:22:07 +01:00
Rebecca Law
789492060c
Merge pull request #1198 from alphagov/fix-redis-error
...
Stop redis cache from throwing an error
2017-08-23 09:38:20 +01:00
Rebecca Law
029daf1820
Added an assert that the set cache method is not called if the cache values are empty
2017-08-22 16:43:22 +01:00
Leo Hemsted
077a5e62f5
re-introduce flask-marshmallow
2017-08-22 16:15:11 +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
Leo Hemsted
c36e50bef1
update dependencies
2017-08-18 17:02:31 +01:00
Imdad Ahad
e05160bdfb
Aggregate monthly totals from billing data
2017-08-18 16:12:01 +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
dfd431516b
Remove redundant method
2017-08-18 13:52:13 +01:00
Imdad Ahad
d7d2ff7af4
Query the correct table for monthly billing usage:
...
* Query `MonthlyBilling` for the monthly usage and transform
response for admin
2017-08-18 13:38:53 +01:00
kentsanggds
3bfbb9d71f
Merge pull request #1178 from alphagov/ken-use-inbound-number
...
Use inbound number for delivering sms and to show on service settings
2017-08-18 11:42:52 +01:00
Chris Hill-Scott
953e2ae5bd
Merge pull request #1180 from alphagov/return-template-name
...
Return template name in public API
2017-08-17 12:44:24 +01:00
Imdad Ahad
f40889e6e0
This adds new endpoints to retrieve billing data from the new table:
...
1. Create a separate billing blueprint to house these endpoints
2. Return monthly breakdown in same format as we did before
3. Return yearly breakdown but only return {billing units, rate,
notification_type}. Admin only makes use of these.
2017-08-17 11:10:42 +01:00
Ken Tsang
3a70d63a7c
Test for inbound_number when no inbound_sms permissions
2017-08-16 16:28:56 +01:00
Ken Tsang
902b28e00f
Refactor to check active flag
2017-08-16 16:27:42 +01:00
Ken Tsang
fbe1a14304
Removed create_inbound_numberfrom fixture
2017-08-16 14:23:32 +01:00
Ken Tsang
c36423aac6
Refactor code for dao_fetch_servies_by_sms_sender to use inbound_numbers
...
This will need to be refactored after the deployment of api and admin and after the update script for existing services using inbound numbers has been executed.
2017-08-16 12:51:31 +01:00
Ken Tsang
667ee57a35
Refactor code to use inbound_numbers if set
2017-08-16 12:50:44 +01:00
Ken Tsang
e14fa2d87e
Refactored to use service_id to set flag
2017-08-16 12:50:44 +01:00
Ken Tsang
7f1de19592
Refactored to put logic into API
2017-08-16 12:50:44 +01:00
Ken Tsang
22956b7427
Refactor code
2017-08-16 12:50:44 +01:00
Ken Tsang
d2a618cf0a
Refactor set_inbound_number_for_service
...
As don't need the check for available inbound numbers
2017-08-16 12:50:44 +01:00
Ken Tsang
0c4c467cac
Added extra tests after refactoring
2017-08-16 12:50:44 +01:00
Ken Tsang
c81b1aa6a0
Correct test for inbound_number
2017-08-16 12:50:44 +01:00
Ken Tsang
838401ebb3
Refactored endpoints
2017-08-16 12:50:44 +01:00
Ken Tsang
104fc93503
Refactor code
2017-08-16 12:50:44 +01:00
Ken Tsang
d5b91f9911
Fixed admin_request bug
2017-08-16 12:50:44 +01:00
Ken Tsang
468048797a
Refactor conftest
2017-08-16 12:50:44 +01:00
Ken Tsang
6908ec4821
Add inbound_number rest and tests
2017-08-16 12:50:44 +01:00
Ken Tsang
47a1403591
Refactor code to add updated_at
2017-08-16 12:50:44 +01:00
Imdad Ahad
94605d31fa
Change how we populate and retrieve MonthlyBilling totals:
...
1. For both email and sms, store [] in monthly_totals if
there is no billing data (no notifications sent etc.) and
return this via the API
2. General refactoring of indentation
2017-08-15 16:09:42 +01:00
Chris Hill-Scott
04e41e3147
Return template name in public API
...
The use for the public template API is for building caseworking systems
or similar, where you might need a list of templates to pick from (ie
instead of using the Notify web interface to pick from and send a
message).
Right now our API isn’t returning the template name as part of the
response. The name is a useful, human-friendly way of identifying a
template.
This commit changes the response to include the name.
Some clients will need updating before this can be useful.
2017-08-15 14:46:30 +01:00
Imdad Ahad
69845e9f37
Add helper methods to retrieve billing data from the new table:
...
Get yearly and monthly billing data from the new table
with filter by notification type. Additionally let's calculate
current day delta totals
2017-08-11 16:57:18 +01:00