Commit Graph

3303 Commits

Author SHA1 Message Date
Chris Hill-Scott
66d1c3ca03 Merge pull request #1194 from alphagov/no-test-key-search
Exclude test keys when searching by recipient
2017-08-22 12:31:00 +01:00
kentsanggds
6cd6e70fe4 Merge pull request #1193 from alphagov/ken-update-inbound_numbers-service_id
Update inbound_numbers to services that have sms_sender in inbound_numbers
2017-08-22 10:02:57 +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
Ken Tsang
27ccbb0cd1 Removed trailing whitespace 2017-08-21 13:31:35 +01:00
Imdad Ahad
8795280ebf Merge pull request #1191 from alphagov/imdad-fix-aggregate-monthly-totals
Fix: Aggregate monthly totals from billing data
2017-08-18 16:24:47 +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
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
39cb66a882 Update script to only update unassigned inbound 2017-08-18 11:49:05 +01:00
Ken Tsang
e6582b90be Add db command to update inbound_numbers
Updates the service_id with the service.id that matches the sms_sender
2017-08-18 11:49:05 +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
Ken Tsang
5bb20e41b3 Update dao_fetch_services_by_ss_sender 2017-08-17 18:15:22 +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
f30b6c4386 Merge pull request #1181 from alphagov/imdad-feat-add-new-billing-endpoints
Add endpoints to retrieve billing data
2017-08-17 11:22:15 +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
Imdad Ahad
9085cc1a57 Merge pull request #1185 from alphagov/imdad-feat-update-billing-data-for-services
Update command populate billing data for services that require it
2017-08-17 09:56:06 +01:00
Ken Tsang
3a70d63a7c Test for inbound_number when no inbound_sms permissions 2017-08-16 16:28:56 +01:00
Ken Tsang
9ab1dfd6d0 Just order by updated_at for inbound_numbers 2017-08-16 16:28:21 +01:00
Ken Tsang
902b28e00f Refactor to check active flag 2017-08-16 16:27:42 +01:00
Katie Smith
2f84e1cc45 Merge pull request #1159 from alphagov/pyup-update-sqlalchemy-utils-0.32.9-to-0.32.14
Update sqlalchemy-utils to 0.32.14
2017-08-16 15:58:06 +01:00
Katie Smith
a4372b901e Merge pull request #1102 from alphagov/pyup-update-psycopg2-2.6.2-to-2.7.3
Update psycopg2 to 2.7.3
2017-08-16 15:57:58 +01:00
Katie Smith
12155fe1a4 Merge pull request #1107 from alphagov/pyup-update-marshmallow-sqlalchemy-0.8.0-to-0.13.1
Update marshmallow-sqlalchemy to 0.13.1
2017-08-16 15:57:49 +01:00
Imdad Ahad
9b88dadb83 Update command populate billing data for services that require it 2017-08-16 15:15:34 +01:00
Ken Tsang
fbe1a14304 Removed create_inbound_numberfrom fixture 2017-08-16 14:23:32 +01:00
Katie Smith
83c0380c35 Merge pull request #1161 from alphagov/pyup-update-gunicorn-19.6.0-to-19.7.1
Update gunicorn to 19.7.1
2017-08-16 14:10:35 +01:00
Katie Smith
343eae57a1 Merge pull request #1182 from alphagov/pyup-update-coveralls-1.1-to-1.2.0
Update coveralls to 1.2.0
2017-08-16 14:10:21 +01:00
Katie Smith
cc76e0ef19 Merge pull request #1183 from alphagov/pyup-update-apispec-0.14.0-to-0.25.0
Update apispec to 0.25.0
2017-08-16 14:09:42 +01:00
Ken Tsang
084eac5735 Update dao to order by updated_at, number 2017-08-16 14:02:47 +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
ce962380e3 Update to return empty json block not '' 2017-08-16 12:50:44 +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
4eba6335d6 Moved url_prefix to inbound_number rest.py 2017-08-16 12:50:44 +01:00
Ken Tsang
81754712ce Removed number col size migration 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
f0e9b93136 Update path to use dash 2017-08-16 12:50:44 +01:00
Ken Tsang
6f12b760f3 Removed print 2017-08-16 12:50:44 +01:00
Ken Tsang
faae6e3537 Update inbound_number number col size 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