Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions en/web-interface/billing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Yeti billing is simple and based on processing different types of billing events
accounts
payments
services
service_types
transactions
invoices
invoice_templates
43 changes: 43 additions & 0 deletions en/web-interface/billing/service_types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.. _service_type:

=============
Service Types
=============

A **Service Type** object is a template for a service. It defines how a service behaves during its life-cycle.

Id
Unique identifier of the Service Type.

Name
Human-readable name of the Service Type.

Force Renew
When enabled, this flag forces service renewal even if the customer’s account
balance is insufficient (``balance <= min_balance``).
In this case, the service is renewed and the corresponding price is still charged.

.. spelling:word-list::
FreeMinutes
PhoneSystems

Provisioning Class
Specifies system behavior during the service life-cycle (Creation, Renewal, Deletion).

Billing::Provisioning::Logging
This provisioning class requires no configuration variables and performs no actions.
It can be used for services that only need to charge the account periodically.

Billing::Provisioning::FreeMinutes
Provisioning class that provides packages of free minutes.

Billing::Provisioning::PhoneSystems
Provisioner for account creation on the DIDWW Phone.Systems cloud PBX platform.
It creates an Account, Incoming and Outgoing trunks on the Phone.Systems side
(via the `Operator API <https://doc.telecom.center/introduction.html>`_), and a gateway on the Yeti side to exchange calls with the Phone Systems Account.

UI Type
Optional setting that controls how the service is displayed in the :ref:`Customer Portal <yeti_client>`.

Variables
Optional provisioning class configuration in JSON format.
39 changes: 23 additions & 16 deletions en/web-interface/billing/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,59 @@
Services
========

Service object represents additional paid service not related to per-second call billing. Service may charge customer account one time or multiple times during **renew** procedure
A **Service** object represents an additional paid service that is not related to per-second call billing.
A service may charge the customer’s account once or multiple times during the **renew** procedure.

Id
Unique payment id.
Unique identifier of the Service.

UUID
Unique payment id.
Globally unique identifier (UUID) of the Service.

Name
Name of service.
Name of the Service.

Account
Account related to payment.
Account to which payments are applied.

Type
Service Type.
:ref:`Service Type <service_type>` of the Service.

Variables
Service variables. Data format depends on configured Service Type.
Service-specific variables.
The data format depends on the configured Service Type.

State
Current state of service.
Current state of the Service.

Initial price
Price that will bill be charged immediately after service creation.
Price charged immediately after the Service is created.

Renew price
Price of renew.
Price charged during each renewal.

Created At
Timestamp of service creation.
Timestamp of when the Service was created.

Renew At
Timestamp when service will be renewed.
Timestamp of the next renewal.

Renew Period
Daily or Monthly.
Defines how the next **Renew At** date is calculated during the renewal process.
Possible values:

- **Daily** – Renew At is set to 00:00 of the next day.
- **Monthly** – Renew At is set to 1st day of the next month, at 00:00.

Creation of service with non-zero **Initial price** value will cause creation of :ref:`Transaction <transaction>` object and it will cause Account balance modification.
Creating a Service with a non-zero **Initial price** will automatically create a
:ref:`Transaction <transaction>` object, which modifies the Account balance.

Renew procedure
===============

Renew time controlled by **Renew At** value. Initially this value defined during service creation. During renew next **Renew At** will be set according to **Renew Period** configuration.

The renewal time is controlled by the **Renew At** value.
This value is set during Service creation.
During each renewal, the next **Renew At** timestamp is updated according to the **Renew Period** configuration.


.. mermaid::
Expand Down