We should not be running code that loads a configuration file in
a BEGIN block, as that will execute just by loading the module.
This makes using this module conditionally in other programs or testing
that code more difficult, as we would need to mock either this module
or the configuration file.
Just load the configuration file once in the constructor and cache
its contents, to avoid the overhead.
Change-Id: I86986dc81eaa32833b738ffa6df2a5de30159482
Instead of recomputing these every time we do a request, cache them
and reuse to avoid the object construction time, when we do not need
different constructor arguments over time.
Change-Id: I4d6039fc312a4e453a9eac6d59fe28f877613a6b
The to/from_json() are deprecated functions, which we should not be
using. Switch to the new ones, which also means we can stop encoding
the strings to and from UTF-8 explicitly.
Change-Id: Ie29371d532a51a3a62d54c35d22a6d488fe1b513
* ngcp-fraud-daily-lock and ngcp-fraud-auto-lock are
not supported anymore and replacted by ngcp-fraud-notifier
that does not lock contracts/subscribers but sends email
notifications and updates cdr_period_costs "notify_status"
and "nofified_at"
Change-Id: Icacbddc68fb25408a388f52427aab993c085dba3
* Fixed the POST data to correctly
build the primary number hash in
the ngcp-create-subscriber script
Change-Id: I03e2e5270d5f93d518d889584a3657b9ca1b64c3
For the same reason we demoted the Debian dependency from a Depends to a
Recommends, because the NGCP::API do not necessarily need an ngcp-panel
instance running on the same host, we match the perl module metadata.
Change-Id: I43fe985c34db1e3206b607648028389ad0b93c09
The current ngcp-api-tools package name seems to indicate this contains
some actual tool, but it only provides perl modules. Let's rename it to
clarify its actual intent.
At the same time we demote the ngcp-panel from a Depends to a
Recommends, because this is an HTTP client and can be used from a host
that has no panel installed against a host that has it. And remove the
ngcp-api-tools provides as we are not providing any tool.
Change-Id: I3fd3854a91cc680f71d5465bc7c397f292f7b95a
* it is important that next_page() retains the original
query params via links->next->href as otherwise
that leads to unpredicted results and no filtering
Change-Id: I8606a9fa03758eb214c7aa38958f158f2cc1a16e
Names with underscores are more difficult to type. Use the prevalent
style of dashes as separators.
Add backwards compatibility symlinks to avoid breakage.
Change-Id: If6afcb1df4908ff6888afa3d9b2082eee4d3ed7d
- Bump debhelper compatibility version 10.
- Switch from Priority extra to optional.
- New .gitignore and debian/.gitignore files.
Change-Id: If09f7fa516b5e30f9376009066afe2b3cf504f1e
* in certain cases $event->{interval_lock} may be undef
and a check is added to prevent the script from exiting
abnormally
Change-Id: I179d60efd796996db8dee280df6da2a3f1fa5b21