Athanasios Voutsadakis
336462cdb2
Fix whitespaces
2017-04-28 15:11:36 +01:00
Athanasios Voutsadakis
74433c9335
Add tests for autoconfirmation
2017-04-28 15:11:36 +01:00
Imdad Ahad
34de722e73
Add test to check for sent notification
2017-04-28 13:32:23 +01:00
Leo Hemsted
f577e91134
treat sent as delivered in detailed service api
...
this is for when we fetch the large blue numbers for viewing
notifications for an entire service
2017-04-28 11:56:12 +01:00
kentsanggds
56e5045e9a
Merge pull request #928 from alphagov/update-billing-api-with-rate
...
Update billing api with rate
2017-04-28 11:40:05 +01:00
Leo Hemsted
fd4e27bfd3
add type conversion to report downloads
...
"sent" is fine as an internal marker but not very obvious to the end
user that it specifically refers to international messages. We now
say "Sent internationally" in the CSV
2017-04-28 11:00:55 +01:00
Ken Tsang
baf84b53d3
Update test to check it doesn't get email usage
2017-04-28 10:10:49 +01:00
Rebecca Law
3b41478a0a
Updated Notification model to use Float(asdecimal=False) for rate_mutliplier.
...
Added test with multiple rows for a month.
2017-04-28 10:10:49 +01:00
Rebecca Law
1a64509186
Change the resultset from the yearly and monthly billing data queries.
...
Fix some formatting of the return objects.
2017-04-28 10:10:49 +01:00
Rebecca Law
a186fc95be
Added new endpoints to return the yearly-usage and monthly-usage for a given financial year and service id.
...
Since the response has changed I have created new endpoints so that the deployments for Admin are more managable.
Removed print statements from some tests.
2017-04-28 10:10:48 +01:00
Rebecca Law
e1e55edd9c
Add new fields to the usage queries: rate_multiplier, international, phone_prefix.
2017-04-28 10:10:48 +01:00
Rebecca Law
4c37c8bdbb
New query to get billing data per month.
2017-04-28 10:10:48 +01:00
Rebecca Law
6dc336ad6c
Created new queries to return the rate with the sum of billable units for the year totals.
...
Once we have the new columns in notifications table, the query will need to include the rate multiplier and if the number is international.
The monthly billing query will be built next.
2017-04-28 10:10:48 +01:00
Imdad Ahad
e450f15b2b
Fix typo and update test now that we expect sent for international
2017-04-27 16:57:04 +01:00
Imdad Ahad
c5bd685cef
Don't update sent notifications (dao)
2017-04-27 16:55:39 +01:00
Martyn Inglis
349fb3529e
Handle case for international SMS - use correct phone validator, and also set status correctly.
...
This relies on some other code so this commit has placeholder failing tests to be populated when other PRs are merged.
2017-04-27 16:27:14 +01:00
Chris Hill-Scott
698b20596f
Remove references to old utils code
...
These methods don’t exist any more.
Not doing this reformatting in the tests probably makes the tests more
robust too 😬
2017-04-27 16:03:27 +01:00
Imdad Ahad
162fc8de04
Merge pull request #925 from alphagov/feat-use-intl-provider-send-sms
...
Feat use intl provider send sms
2017-04-27 15:33:45 +01:00
Imdad Ahad
3de93cbcd0
Assume that we will only receive a UK number:
...
* We currently don't validate the number so this test
* will fail assuming an invalid number was passed.
* Since we do validation on the front end, for now
* we'll assume a valid number. This does need to be
* looked at in future.
2017-04-27 13:24:48 +01:00
Imdad Ahad
252c3235d7
Persist intl fields on notification
2017-04-27 13:24:36 +01:00
minglis
a8ea333606
Merge pull request #923 from alphagov/validate-int-numbers-on-api
...
Validate International phone numbers
2017-04-27 13:21:04 +01:00
Martyn Inglis
99081488f1
Mock out some SQS calls
2017-04-27 12:47:08 +01:00
Martyn Inglis
bedbd8e21f
Removed unneeded test case
2017-04-27 12:15:47 +01:00
Martyn Inglis
cdd3ad687c
updated the fixture
2017-04-27 12:14:31 +01:00
Martyn Inglis
109b1727f2
Fish out the international provider if needed.
2017-04-27 12:14:22 +01:00
Martyn Inglis
ba58c55c3b
Filter provider details by international flags
2017-04-27 12:13:58 +01:00
Martyn Inglis
84860b2a1d
Adds a debug line to try and debug jenkins
2017-04-27 10:41:31 +01:00
Martyn Inglis
83dc7c2bb7
Little test updates
2017-04-27 09:58:37 +01:00
Imdad Ahad
05145afcec
Fix tests for checking simulated recipients
2017-04-26 17:26:06 +01:00
Leo Hemsted
a138ec478a
Merge branch 'master' into sent-status
2017-04-26 16:52:16 +01:00
Martyn Inglis
2a0f8c8808
Validate International phone numbers
...
- uses new utils methods to validate phone numbers
- defaults to International=True on validation. This ensures the validator works on all numbers
- Then check if the user can send this message to the number internationally if needed.
2017-04-26 15:56:45 +01:00
Imdad Ahad
68edd7a33f
Fix PEP issues :-|
2017-04-26 11:52:03 +01:00
Imdad Ahad
26b35c5d15
Add intl notificiation fields
2017-04-26 11:31:05 +01:00
Imdad Ahad
3d312c7342
Merge pull request #918 from alphagov/feat-add-intl-provider-migration
...
Add international support flag for providers (migration)
2017-04-26 11:15:26 +01:00
minglis
5247185852
Merge pull request #919 from alphagov/endpoint-for-dvla-callbacks
...
Wired in a simple callback to handle SNS notifications from S3
2017-04-26 06:38:19 +01:00
minglis
a87e1b0a85
Merge pull request #914 from alphagov/international-sms-feature-tests
...
Update tests to include international sms flag
2017-04-26 06:37:58 +01:00
Imdad Ahad
25ce3851eb
Add international support flag for providers
2017-04-25 17:33:16 +01:00
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
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
Rebecca Law
e8a7762688
Merge branch 'master' into update-sms-rate
2017-04-25 10:15:54 +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
Ken Tsang
aed9bc0fe7
Added tests for international sms flag
2017-04-24 13:01:13 +01:00
Imdad Ahad
c4fac1d937
Revert "Revert "add DVLA organisations to API""
2017-04-21 16:05:07 +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
49fb4823e3
Refactor tests
2017-04-21 11:07:45 +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
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