any *attempt* of a top-up request should be
logged.
+create top-up log records for api
in order to record failed top-up requests as well,
the somewhat tricky thing is to have two
separate transactions here
+propery casting of topup request json field
values to numbers etc., so the transaction for
creating the log entry cannot fail and e.g.
requests with subscriber_id='blah' are recorded
correctly
+new "request_token" parameter for /api/topupvoucher
and /api/topupcash, to identify and filter for
particular requests.
+topup log api resource
+topup log api tests
+fix to correctly reject used vouchers
+topup log panel UI
+fix for balanceintervals.t threaded tests
Change-Id: I86eb845f6173803705b12cc7e5cdbac9a3153a0a
Cli can be edited through subscriberpreferences.
In such case it's value should be preserved on primary_number change.
Change-Id: I6b9d4a8d70e6e85dd9e2bf063cf4c047296deea1
in short: whenever the contract_balances "cash_balance" is
about to decrease, it might drop below thresholds defined
by a contract's profile package. in that case, subscribers
are to be locked and/or underrun billing profile sets are
to be applied. this commit also contains some minor fixes:
+when creating/editing profile packages, all billing
profiles of initial, topup, underrun sets must show the
same interval_free_cash and interval_free_time values.
there was also a problem with adding profile sets to
packages that use profile with prepaid = 1 (see ticket
14301)
+when editing packages using the panel UI, the validation
was not properly invoked (!) +the frequency of topups has
to be limited to 1 per second.
+updating the "lock" subscriber prior to editing or viewing
it in the panel UI was added.
+topup cash and topup voucher panel UI added
+when aquiring multiple contract row locks at once, no
joined tables are used any mure. the number of row locks
is therefore minimal now (see ticket 14903)
+rework of updating prepaid subscriber preference
Change-Id: Ideb0fec2404ca10b3ac5d8735f53620d0c3a24ed
previously all primary numbers have been filtered out.
This is wrong, if the number has been the primary number
of a previous (terminated) subscriber.
Change-Id: Iebbd96898715d86bfd10ac6d2d084c46de08def6
get it directly without accessing provisioning.voip_subscriber
and notify about terminated subscribers
Change-Id: Ife6d936c052b3dcda0f03013ee53bafa34b9f19b
If no primary number is given but a number range is provided, use
the first of the range as primary number.
Change-Id: I9b3a7bf1d4b1523f9cd0af3a3a7a70c95bb8d3ab
This makes it backwards-compatible to ossbss. At some point, the
timezone should be taken from the customer or domain, but that would
need to affect also CDRs etc.