Commit Graph

9 Commits

Author SHA1 Message Date
Chris Hill-Scott
1d3a4e5043 Inherit don’t duplicate API client constructor
This removes some code which is duplicative and obscure (ie it’s not
very clear why we do `"a" * 73` even though there is a Very Good Reason
for doing so).
2019-01-29 12:11:27 +00:00
Chris Hill-Scott
9e798506c5 Initialise clients outside the app
This avoids the annoying problem where you can’t import a client unless
the app has already been initialised.
2018-10-30 14:59:24 +00:00
Pea Tyczynska
6d2aad5561 Remove functions and comments redundant after monthly_billing removal 2018-07-25 11:48:17 +01:00
Rebecca Law
d8c8b6a454 Temporary endpoint to test the new usage page updates.
This code will go away once we are happy the results match.
2018-05-16 12:26:11 +01:00
Alexey Bezhan
acfe8092fc Add route secret key header to the API requests
Currently requests to the API made from the admin app are going from
PaaS admin app to the nginx router ELB, which then routes them back
to the api app on PaaS.

This makes sense for external requests, but for requests made from
the admin app we could skip nginx and go directly to the api PaaS
host, which should reduce load on the nginx instances and
potentially reduce latency of the api requests.

API apps on PaaS are checking the X-Custom-Forwarder header (which
is set by nginx on proxy_pass requests) to only allow requests going
through the proxy.

This adds the custom header to the API client requests, so that they
can pass that header check without going through nginx.
2018-02-28 11:28:46 +00:00
venusbb
1ab4681ff5 Use the revise api endpoints without current-year parameter 2017-11-09 13:18:09 +00:00
venusbb
8ea38ba7b6 Use annual_billing tables at backend for getting and updating free_sms_fragment_limit 2017-10-31 11:22:57 +00:00
Imdad Ahad
232912ab3b Call the correct endpoint to retrieve yearly billing usage 2017-08-17 16:02:30 +01:00
Imdad Ahad
32242c4501 Update the usage page to use new billing endpoints
* Create new billing_api_client for separation and remove
older methods in the service_api_client
2017-08-16 16:31:47 +01:00