Martyn Inglis
96d30d31b1
Get existing tests to pass.
...
Done by ensuring that the rate limit is 0, so that all messages are billable.
2017-06-06 14:55:37 +01:00
Martyn Inglis
0db8297693
Removed print statement
2017-05-24 09:59:07 +01:00
Martyn Inglis
9dd6041944
Usage DAO can now return rates and billable amount, alongside units.
2017-05-24 08:56:59 +01:00
Martyn Inglis
119f0532ab
Renamed the API method/url
2017-05-22 10:06:34 +01:00
Martyn Inglis
2a0669636d
Add and test new DAO method that counts the billable units multiplied by rate multiplier for a given service for a given time period.
...
Currently this is SMS only.
Used by the dashboard for a headline figure.
2017-05-19 16:42:33 +01:00
Rebecca Law
81e10896ea
Remove print statement
2017-05-04 09:47:27 +01:00
Rebecca Law
93e76d2362
Update the valid_from date for the rate that is intended to start at the begining of the financial year.
...
It was the start of the financial year in BST, needed to convert it to UTC.
Small change to the logic to find the rates.
2017-05-03 17:11:48 +01:00
Ken Tsang
03885fea2f
Update tests with new rates
2017-05-03 13:13:13 +01:00
Ken Tsang
a1a8397f74
Update billing data to handle future dates
2017-05-02 19:23:57 +01:00
Rebecca Law
c40111a576
Split up a test
2017-05-02 11:20:01 +01:00
Rebecca Law
88d92d6070
Fix the logic gettting the rates for a financial year.
...
The is_between_end_date_exclusive is a bit funny.
Perhaps the better way to handle it is to make the function is_between but change the financial year function return an enddate that is one millisecond less. That way we can always use the between logic and it will be easier to use.
2017-04-28 16:55:41 +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