]> git.stg.codes - stg.git/blob - doc/xmlrpc/API-tariffs.xml
Update ChangeLog.
[stg.git] / doc / xmlrpc / API-tariffs.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook">
3     <title>Управление тарифами</title>
4     <para>В этом разделе собраны вызовы для манипулирования тарифными планами. Тарифный план включает в себя:</para>
5     <itemizedlist>
6         <listitem><para>название;</para></listitem>
7         <listitem><para>абонплата;</para></listitem>
8         <listitem><para>количество бесплатных мегабайт, включенных в абонплату;</para></listitem>
9         <listitem><para>стоимость "заморозки" пользователя;</para></listitem>
10         <listitem>
11             <para>тип подсчета трафика:</para>
12             <itemizedlist>
13                 <listitem><para>только входящий,</para></listitem>
14                 <listitem><para>только исходящий,</para></listitem>
15                 <listitem><para>входящий и исходящий суммарно,</para></listitem>
16                 <listitem><para>максимум из входящего и исходящего</para></listitem>
17             </itemizedlist>
18         </listitem>
19         <listitem>
20             <para>информацию о тарификации направлений:</para>
21             <itemizedlist>
22                 <listitem><para>время начала дня;</para></listitem>
23                 <listitem><para>конца дня;</para></listitem>
24                 <listitem><para>цена за мегабайт трафика до порога днем;</para></listitem>
25                 <listitem><para>цена за мегабайт трафика после порога днем;</para></listitem>
26                 <listitem><para>цена за мегабайт трафика до порога ночью;</para></listitem>
27                 <listitem><para>цена за мегабайт трафика после порога ночью;</para></listitem>
28                 <listitem><para>пороговый объем трафика в мегабайтах;</para></listitem>
29                 <listitem><para>флаг игнорирования времени суток;</para></listitem>
30                 <listitem><para>флаг игнорирования порога.</para></listitem>
31             </itemizedlist>
32         </listitem>
33     </itemizedlist>
34     <refentry id="stargazer.get_tariff">
35         <refmeta>
36             <refentrytitle>stargazer.get_tariff</refentrytitle>
37         </refmeta>
38         <refnamediv>
39             <refname>stargazer.get_tariff</refname>
40             <refpurpose>Получает информацию о тарифном плане</refpurpose>
41         </refnamediv>
42         <refsynopsisdiv>
43             <funcsynopsis>
44                 <funcprototype>
45                     <funcdef><function>stargazer.get_tariff</function></funcdef>
46                     <paramdef>string <parameter>cookie</parameter></paramdef>
47                     <paramdef>string <parameter>tariff</parameter></paramdef>
48                 </funcprototype>
49             </funcsynopsis>
50         </refsynopsisdiv>
51         <refsect1>
52             <title>Description</title>
53             <para>Метод <function>stargazer.get_tariff</function> получает информацию о тарифном плане.</para>
54             <variablelist>
55                 <varlistentry>
56                     <term>string <parameter>cookie</parameter></term>
57                     <listitem>
58                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
59                     </listitem>
60                 </varlistentry>
61                 <varlistentry>
62                     <term>string <parameter>tariff</parameter></term>
63                     <listitem>
64                         <para>Название тарифа</para>
65                     </listitem>
66                 </varlistentry>
67             </variablelist>
68             <refsect2>
69                 <title>Return Value</title>
70                 <para>
71                     Возвращает структуру:
72                     <variablelist>
73                         <varlistentry>
74                             <term>boolean <parameter>result</parameter></term>
75                             <listitem>
76                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
77                             </listitem>
78                         </varlistentry>
79                         <varlistentry>
80                             <term>string <parameter>name</parameter></term>
81                             <listitem>
82                                 <para>Название тарифа</para>
83                             </listitem>
84                         </varlistentry>
85                         <varlistentry>
86                             <term>double <parameter>fee</parameter></term>
87                             <listitem>
88                                 <para>Абонплата</para>
89                             </listitem>
90                         </varlistentry>
91                         <varlistentry>
92                             <term>double <parameter>freemb</parameter></term>
93                             <listitem>
94                                 <para>Количество бесплатных мегабайт включенных в абонплату</para>
95                             </listitem>
96                         </varlistentry>
97                         <varlistentry>
98                             <term>double <parameter>passivecost</parameter></term>
99                             <listitem>
100                                 <para>Стоимость "заморозки" пользователя</para>
101                             </listitem>
102                         </varlistentry>
103                         <varlistentry>
104                             <term>int <parameter>trafftype</parameter></term>
105                             <listitem>
106                                 <para>Тип подсчета трафика:
107                                     <simplelist type="vert">
108                                         <member>0 &#151; подсчитывать только исходящий трафик</member>
109                                         <member>1 &#151; подсчитывать только входящий трафик</member>
110                                         <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
111                                         <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
112                                     </simplelist>
113                                 </para>
114                             </listitem>
115                         </varlistentry>
116                         <varlistentry>
117                             <term>string <parameter>period</parameter></term>
118                             <listitem>
119                                 <para>Периодичность снятия абонплаты:
120                                     <simplelist type="vert">
121                                         <member>month &#151; ежедневная абонплата (параметр Fee трактуется как значение списываемое ежедневно)</member>
122                                         <member>day &#151; ежемесячная абонплата (классическая, параметр Fee трактуется как значение списываемое за месяц, в том числе в режиме SpreadFee)</member>
123                                     </simplelist>
124                                 </para>
125                             </listitem>
126                         </varlistentry>
127                         <varlistentry>
128                             <term>string <parameter>changePolicy</parameter></term>
129                             <listitem>
130                                 <para>Политика смены тарифа:
131                                     <simplelist type="vert">
132                                         <member>allow &#151; на период действия политики смена тарифного плана разрешена</member>
133                                         <member>to_cheap &#151; на период действия политики разрешена смена тарифного плана на более дешевый</member>
134                                         <member>to_expensive &#151; на период действия политики разрешена смена тарифного плана на более дорогой</member>
135                                         <member>deny &#151; на период действия политики смена тарифного плана запрещена</member>
136                                     </simplelist>
137                                 </para>
138                             </listitem>
139                         </varlistentry>
140                         <varlistentry>
141                             <term>int <parameter>changePolicyTimeout</parameter></term>
142                             <listitem>
143                                 <para>Момент завершения действия политики тарификации (0 - политика тарификации не завершается никогда)</para>
144                             </listitem>
145                         </varlistentry>
146                         <varlistentry>
147                             <term>array of struct <parameter>dirprices</parameter></term>
148                             <listitem>
149                                 <para>Массив стурктур, описывающих тарификацию направлений:
150                                     <variablelist>
151                                         <varlistentry>
152                                             <term>int <parameter>hday</parameter></term>
153                                             <listitem>
154                                                 <para>Часы начала дня</para>
155                                             </listitem>
156                                         </varlistentry>
157                                         <varlistentry>
158                                             <term>int <parameter>mday</parameter></term>
159                                             <listitem>
160                                                 <para>Минуты начала дня</para>
161                                             </listitem>
162                                         </varlistentry>
163                                         <varlistentry>
164                                             <term>int <parameter>hnight</parameter></term>
165                                             <listitem>
166                                                 <para>Часы начала ночи</para>
167                                             </listitem>
168                                         </varlistentry>
169                                         <varlistentry>
170                                             <term>int <parameter>mnight</parameter></term>
171                                             <listitem>
172                                                 <para>Минуты начала ночи</para>
173                                             </listitem>
174                                         </varlistentry>
175                                         <varlistentry>
176                                             <term>double <parameter>pricedaya</parameter></term>
177                                             <listitem>
178                                                 <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
179                                             </listitem>
180                                         </varlistentry>
181                                         <varlistentry>
182                                             <term>double <parameter>pricedayb</parameter></term>
183                                             <listitem>
184                                                 <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
185                                             </listitem>
186                                         </varlistentry>
187                                         <varlistentry>
188                                             <term>double <parameter>pricenighta</parameter></term>
189                                             <listitem>
190                                                 <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
191                                             </listitem>
192                                         </varlistentry>
193                                         <varlistentry>
194                                             <term>double <parameter>pricenightb</parameter></term>
195                                             <listitem>
196                                                 <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
197                                             </listitem>
198                                         </varlistentry>
199                                         <varlistentry>
200                                             <term>int <parameter>threshold</parameter></term>
201                                             <listitem>
202                                                 <para>Величина порога в мегабайтах</para>
203                                             </listitem>
204                                         </varlistentry>
205                                         <varlistentry>
206                                             <term>boolean <parameter>singleprice</parameter></term>
207                                             <listitem>
208                                                 <para>Цена не зависит от времени суток</para>
209                                             </listitem>
210                                         </varlistentry>
211                                         <varlistentry>
212                                             <term>boolean <parameter>nodiscount</parameter></term>
213                                             <listitem>
214                                                 <para>Цена не зависит от порога</para>
215                                             </listitem>
216                                         </varlistentry>
217                                     </variablelist>
218                                 </para>
219                             </listitem>
220                         </varlistentry>
221                     </variablelist>
222                 </para>
223             </refsect2>
224         </refsect1>
225         <refsect1>
226             <title>See also</title>
227             <para>
228                 <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
229                 <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
230                 <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
231                 <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
232             </para>
233         </refsect1>
234     </refentry>
235     <refentry id="stargazer.get_tariffs">
236         <refmeta>
237             <refentrytitle>stargazer.get_tariffs</refentrytitle>
238         </refmeta>
239         <refnamediv>
240             <refname>stargazer.get_tariffs</refname>
241             <refpurpose>Получает информацию о тарифных планах</refpurpose>
242         </refnamediv>
243         <refsynopsisdiv>
244             <funcsynopsis>
245                 <funcprototype>
246                     <funcdef><function>stargazer.get_tariffs</function></funcdef>
247                     <paramdef>string <parameter>cookie</parameter></paramdef>
248                 </funcprototype>
249             </funcsynopsis>
250         </refsynopsisdiv>
251         <refsect1>
252             <title>Description</title>
253             <para>Метод <function>stargazer.get_tariffs</function> получает информацию о тарифных планах.</para>
254             <variablelist>
255                 <varlistentry>
256                     <term>string <parameter>cookie</parameter></term>
257                     <listitem>
258                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
259                     </listitem>
260                 </varlistentry>
261             </variablelist>
262             <refsect2>
263                 <title>Return Value</title>
264                 <para>
265                     Возвращает массив структур:
266                     <variablelist>
267                         <varlistentry>
268                             <term>boolean <parameter>result</parameter></term>
269                             <listitem>
270                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
271                             </listitem>
272                         </varlistentry>
273                         <varlistentry>
274                             <term>string <parameter>name</parameter></term>
275                             <listitem>
276                                 <para>Название тарифа</para>
277                             </listitem>
278                         </varlistentry>
279                         <varlistentry>
280                             <term>double <parameter>fee</parameter></term>
281                             <listitem>
282                                 <para>Абонплата</para>
283                             </listitem>
284                         </varlistentry>
285                         <varlistentry>
286                             <term>double <parameter>freemb</parameter></term>
287                             <listitem>
288                                 <para>Количество бесплатных мегабайт включенных в абонплату</para>
289                             </listitem>
290                         </varlistentry>
291                         <varlistentry>
292                             <term>double <parameter>passivecost</parameter></term>
293                             <listitem>
294                                 <para>Стоимость "заморозки" пользователя</para>
295                             </listitem>
296                         </varlistentry>
297                         <varlistentry>
298                             <term>int <parameter>trafftype</parameter></term>
299                             <listitem>
300                                 <para>Тип подсчета трафика:
301                                     <simplelist type="vert">
302                                         <member>0 &#151; подсчитывать только исходящий трафик</member>
303                                         <member>1 &#151; подсчитывать только входящий трафик</member>
304                                         <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
305                                         <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
306                                     </simplelist>
307                                 </para>
308                             </listitem>
309                         </varlistentry>
310                         <varlistentry>
311                             <term>string <parameter>period</parameter></term>
312                             <listitem>
313                                 <para>Периодичность снятия абонплаты:
314                                     <simplelist type="vert">
315                                         <member>month &#151; ежедневная абонплата (параметр Fee трактуется как значение списываемое ежедневно)</member>
316                                         <member>day &#151; ежемесячная абонплата (классическая, параметр Fee трактуется как значение списываемое за месяц, в том числе в режиме SpreadFee)</member>
317                                     </simplelist>
318                                 </para>
319                             </listitem>
320                         </varlistentry>
321                         <varlistentry>
322                             <term>string <parameter>changePolicy</parameter></term>
323                             <listitem>
324                                 <para>Политика смены тарифа:
325                                     <simplelist type="vert">
326                                         <member>allow &#151; на период действия политики смена тарифного плана разрешена</member>
327                                         <member>to_cheap &#151; на период действия политики разрешена смена тарифного плана на более дешевый</member>
328                                         <member>to_expensive &#151; на период действия политики разрешена смена тарифного плана на более дорогой</member>
329                                         <member>deny &#151; на период действия политики смена тарифного плана запрещена</member>
330                                     </simplelist>
331                                 </para>
332                             </listitem>
333                         </varlistentry>
334                         <varlistentry>
335                             <term>int <parameter>changePolicyTimeout</parameter></term>
336                             <listitem>
337                                 <para>Момент завершения действия политики тарификации (0 - политика тарификации не завершается никогда)</para>
338                             </listitem>
339                         </varlistentry>
340                         <varlistentry>
341                             <term>array of struct <parameter>dirprices</parameter></term>
342                             <listitem>
343                                 <para>Массив стурктур, описывающих тарификацию направлений:
344                                     <variablelist>
345                                         <varlistentry>
346                                             <term>int <parameter>hday</parameter></term>
347                                             <listitem>
348                                                 <para>Часы начала дня</para>
349                                             </listitem>
350                                         </varlistentry>
351                                         <varlistentry>
352                                             <term>int <parameter>mday</parameter></term>
353                                             <listitem>
354                                                 <para>Минуты начала дня</para>
355                                             </listitem>
356                                         </varlistentry>
357                                         <varlistentry>
358                                             <term>int <parameter>hnight</parameter></term>
359                                             <listitem>
360                                                 <para>Часы начала ночи</para>
361                                             </listitem>
362                                         </varlistentry>
363                                         <varlistentry>
364                                             <term>int <parameter>mnight</parameter></term>
365                                             <listitem>
366                                                 <para>Минуты начала ночи</para>
367                                             </listitem>
368                                         </varlistentry>
369                                         <varlistentry>
370                                             <term>double <parameter>pricedaya</parameter></term>
371                                             <listitem>
372                                                 <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
373                                             </listitem>
374                                         </varlistentry>
375                                         <varlistentry>
376                                             <term>double <parameter>pricedayb</parameter></term>
377                                             <listitem>
378                                                 <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
379                                             </listitem>
380                                         </varlistentry>
381                                         <varlistentry>
382                                             <term>double <parameter>pricenighta</parameter></term>
383                                             <listitem>
384                                                 <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
385                                             </listitem>
386                                         </varlistentry>
387                                         <varlistentry>
388                                             <term>double <parameter>pricenightb</parameter></term>
389                                             <listitem>
390                                                 <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
391                                             </listitem>
392                                         </varlistentry>
393                                         <varlistentry>
394                                             <term>int <parameter>threshold</parameter></term>
395                                             <listitem>
396                                                 <para>Величина порога в мегабайтах</para>
397                                             </listitem>
398                                         </varlistentry>
399                                         <varlistentry>
400                                             <term>boolean <parameter>singleprice</parameter></term>
401                                             <listitem>
402                                                 <para>Цена не зависит от времени стуок</para>
403                                             </listitem>
404                                         </varlistentry>
405                                         <varlistentry>
406                                             <term>boolean <parameter>nodiscount</parameter></term>
407                                             <listitem>
408                                                 <para>Цена не зависит от порога</para>
409                                             </listitem>
410                                         </varlistentry>
411                                     </variablelist>
412                                 </para>
413                             </listitem>
414                         </varlistentry>
415                     </variablelist>
416                 </para>
417             </refsect2>
418         </refsect1>
419         <refsect1>
420             <title>See also</title>
421             <para>
422                 <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
423                 <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
424                 <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
425                 <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
426             </para>
427         </refsect1>
428     </refentry>
429     <refentry id="stargazer.add_tariff">
430         <refmeta>
431             <refentrytitle>stargazer.add_tariff</refentrytitle>
432         </refmeta>
433         <refnamediv>
434             <refname>stargazer.add_tariff</refname>
435             <refpurpose>Добавляет в систему новый тарифный план</refpurpose>
436         </refnamediv>
437         <refsynopsisdiv>
438             <funcsynopsis>
439                 <funcprototype>
440                     <funcdef><function>stargazer.add_tariff</function></funcdef>
441                     <paramdef>string <parameter>cookie</parameter></paramdef>
442                     <paramdef>string <parameter>tariff</parameter></paramdef>
443                 </funcprototype>
444             </funcsynopsis>
445         </refsynopsisdiv>
446         <refsect1>
447             <title>Description</title>
448             <para>Метод <function>stargazer.add_tariff</function> добавляет в систему новый "пустой" тарифный план. Для его настройки используется метод <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>.</para>
449             <variablelist>
450                 <varlistentry>
451                     <term>string <parameter>cookie</parameter></term>
452                     <listitem>
453                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
454                     </listitem>
455                 </varlistentry>
456                 <varlistentry>
457                     <term>string <parameter>tariff</parameter></term>
458                     <listitem>
459                         <para>Название тарифа</para>
460                     </listitem>
461                 </varlistentry>
462             </variablelist>
463             <refsect2>
464                 <title>Return Value</title>
465                 <para>Возвращет true в случае успеха и false в случае неудачи</para>
466             </refsect2>
467         </refsect1>
468         <refsect1>
469             <title>See also</title>
470             <para>
471                 <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
472                 <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
473                 <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>,
474                 <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
475             </para>
476         </refsect1>
477     </refentry>
478     <refentry id="stargazer.del_tariff">
479         <refmeta>
480             <refentrytitle>stargazer.del_tariff</refentrytitle>
481         </refmeta>
482         <refnamediv>
483             <refname>stargazer.del_tariff</refname>
484             <refpurpose>Удаляет из системы тарифный план</refpurpose>
485         </refnamediv>
486         <refsynopsisdiv>
487             <funcsynopsis>
488                 <funcprototype>
489                     <funcdef><function>stargazer.del_tariff</function></funcdef>
490                     <paramdef>string <parameter>cookie</parameter></paramdef>
491                     <paramdef>string <parameter>tariff</parameter></paramdef>
492                 </funcprototype>
493             </funcsynopsis>
494         </refsynopsisdiv>
495         <refsect1>
496             <title>Description</title>
497             <para>Метод <function>stargazer.del_tariff</function> удаляет из системы тарифный план</para>
498             <variablelist>
499                 <varlistentry>
500                     <term>string <parameter>cookie</parameter></term>
501                     <listitem>
502                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
503                     </listitem>
504                 </varlistentry>
505                 <varlistentry>
506                     <term>string <parameter>tariff</parameter></term>
507                     <listitem>
508                         <para>Название тарифа</para>
509                     </listitem>
510                 </varlistentry>
511             </variablelist>
512             <refsect2>
513                 <title>Return Value</title>
514                 <para>Возвращет true в случае успеха и false в случае неудачи</para>
515             </refsect2>
516         </refsect1>
517         <refsect1>
518             <title>See also</title>
519             <para>
520                 <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
521                 <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
522                 <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
523                 <link linkend="stargazer.chg_tariff"><function>stargazer.chg_tariff</function></link>
524             </para>
525         </refsect1>
526     </refentry>
527     <refentry id="stargazer.chg_tariff">
528         <refmeta>
529             <refentrytitle>stargazer.chg_tariff</refentrytitle>
530         </refmeta>
531         <refnamediv>
532             <refname>stargazer.chg_tariff</refname>
533             <refpurpose>Изменяет информацию о тарифном плане</refpurpose>
534         </refnamediv>
535         <refsynopsisdiv>
536             <funcsynopsis>
537                 <funcprototype>
538                     <funcdef><function>stargazer.chg_tariff</function></funcdef>
539                     <paramdef>string <parameter>cookie</parameter></paramdef>
540                     <paramdef>string <parameter>tariff</parameter></paramdef>
541                     <paramdef>struct <parameter>info</parameter></paramdef>
542                 </funcprototype>
543             </funcsynopsis>
544         </refsynopsisdiv>
545         <refsect1>
546             <title>Description</title>
547             <para>Метод <function>stargazer.chg_tariff</function> изменяет информацию о тарифном плане. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
548             <variablelist>
549                 <varlistentry>
550                     <term>string <parameter>cookie</parameter></term>
551                     <listitem>
552                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
553                     </listitem>
554                 </varlistentry>
555                 <varlistentry>
556                     <term>string <parameter>tariff</parameter></term>
557                     <listitem>
558                         <para>Название тарифа</para>
559                     </listitem>
560                 </varlistentry>
561                 <varlistentry>
562                     <term>struct <parameter>info</parameter></term>
563                     <listitem>
564                         <para>
565                             Структура с информацией о тарифном плане:
566                             <variablelist>
567                                 <varlistentry>
568                                     <term>string <parameter>name</parameter></term>
569                                     <listitem>
570                                         <para>Название тарифа</para>
571                                     </listitem>
572                                 </varlistentry>
573                                 <varlistentry>
574                                     <term>double <parameter>fee</parameter></term>
575                                     <listitem>
576                                         <para>Абонплата</para>
577                                     </listitem>
578                                 </varlistentry>
579                                 <varlistentry>
580                                     <term>double <parameter>freemb</parameter></term>
581                                     <listitem>
582                                         <para>Количество свободных мегабайт, включенных в абонплату</para>
583                                     </listitem>
584                                 </varlistentry>
585                                 <varlistentry>
586                                     <term>double <parameter>passivecost</parameter></term>
587                                     <listitem>
588                                         <para>Стоимость заморозки пользователя</para>
589                                     </listitem>
590                                 </varlistentry>
591                                 <varlistentry>
592                                     <term>int <parameter>trafftype</parameter></term>
593                                     <listitem>
594                                         <para>Тип подсчета трафика:
595                                             <simplelist type="vert">
596                                                 <member>0 &#151; подсчитывать только исходящий трафик</member>
597                                                 <member>1 &#151; подсчитывать только входящий трафик</member>
598                                                 <member>2 &#151; подсчитывать суммарно входящий и исходящий трафик</member>
599                                                 <member>3 &#151; подсчитывать максимальный из входящего и исходящего трафика</member>
600                                             </simplelist>
601                                         </para>
602                                     </listitem>
603                                 </varlistentry>
604                                 <varlistentry>
605                                     <term>string <parameter>period</parameter></term>
606                                     <listitem>
607                                         <para>Периодичность снятия абонплаты:
608                                             <simplelist type="vert">
609                                                 <member>month &#151; ежедневная абонплата (параметр Fee трактуется как значение списываемое ежедневно)</member>
610                                                 <member>day &#151; ежемесячная абонплата (классическая, параметр Fee трактуется как значение списываемое за месяц, в том числе в режиме SpreadFee)</member>
611                                             </simplelist>
612                                         </para>
613                                     </listitem>
614                                 </varlistentry>
615                                 <varlistentry>
616                                     <term>string <parameter>changePolicy</parameter></term>
617                                     <listitem>
618                                         <para>Политика смены тарифа:
619                                             <simplelist type="vert">
620                                                 <member>allow &#151; на период действия политики смена тарифного плана разрешена</member>
621                                                 <member>to_cheap &#151; на период действия политики разрешена смена тарифного плана на более дешевый</member>
622                                                 <member>to_expensive &#151; на период действия политики разрешена смена тарифного плана на более дорогой</member>
623                                                 <member>deny &#151; на период действия политики смена тарифного плана запрещена</member>
624                                             </simplelist>
625                                         </para>
626                                     </listitem>
627                                 </varlistentry>
628                                 <varlistentry>
629                                     <term>int <parameter>changePolicyTimeout</parameter></term>
630                                     <listitem>
631                                         <para>Момент завершения действия политики тарификации (0 - политика тарификации не завершается никогда)</para>
632                                     </listitem>
633                                 </varlistentry>
634                                 <varlistentry>
635                                     <term>array of struct <parameter>dirprices</parameter></term>
636                                     <listitem>
637                                         <para>Массив стурктур, описывающих тарификацию направлений:
638                                             <variablelist>
639                                                 <varlistentry>
640                                                     <term>int <parameter>hday</parameter></term>
641                                                     <listitem>
642                                                         <para>Часы начала дня</para>
643                                                     </listitem>
644                                                 </varlistentry>
645                                                 <varlistentry>
646                                                     <term>int <parameter>mday</parameter></term>
647                                                     <listitem>
648                                                         <para>Минуты начала дня</para>
649                                                     </listitem>
650                                                 </varlistentry>
651                                                 <varlistentry>
652                                                     <term>int <parameter>hnight</parameter></term>
653                                                     <listitem>
654                                                         <para>Часы начала ночи</para>
655                                                     </listitem>
656                                                 </varlistentry>
657                                                 <varlistentry>
658                                                     <term>int <parameter>mnight</parameter></term>
659                                                     <listitem>
660                                                         <para>Минуты начала ночи</para>
661                                                     </listitem>
662                                                 </varlistentry>
663                                                 <varlistentry>
664                                                     <term>double <parameter>pricedaya</parameter></term>
665                                                     <listitem>
666                                                         <para>Цена 1 мегабайта трафика днем до превышения порогового значения</para>
667                                                     </listitem>
668                                                 </varlistentry>
669                                                 <varlistentry>
670                                                     <term>double <parameter>pricedayb</parameter></term>
671                                                     <listitem>
672                                                         <para>Цена 1 мегабайта трафика днем после превышения порогового значения</para>
673                                                     </listitem>
674                                                 </varlistentry>
675                                                 <varlistentry>
676                                                     <term>double <parameter>pricenighta</parameter></term>
677                                                     <listitem>
678                                                         <para>Цена 1 мегабайта трафика ночью до превышения порогового значения</para>
679                                                     </listitem>
680                                                 </varlistentry>
681                                                 <varlistentry>
682                                                     <term>double <parameter>pricenightb</parameter></term>
683                                                     <listitem>
684                                                         <para>Цена 1 мегабайта трафика ночью после превышения порогового значения</para>
685                                                     </listitem>
686                                                 </varlistentry>
687                                                 <varlistentry>
688                                                     <term>int <parameter>threshold</parameter></term>
689                                                     <listitem>
690                                                         <para>Величина порога в мегабайтах</para>
691                                                     </listitem>
692                                                 </varlistentry>
693                                                 <varlistentry>
694                                                     <term>boolean <parameter>singleprice</parameter></term>
695                                                     <listitem>
696                                                         <para>Цена не зависит от времени стуок</para>
697                                                     </listitem>
698                                                 </varlistentry>
699                                                 <varlistentry>
700                                                     <term>boolean <parameter>nodiscount</parameter></term>
701                                                     <listitem>
702                                                         <para>Цена не зависит от порога</para>
703                                                     </listitem>
704                                                 </varlistentry>
705                                             </variablelist>
706                                         </para>
707                                     </listitem>
708                                 </varlistentry>
709                             </variablelist>
710                         </para>
711                     </listitem>
712                 </varlistentry>
713             </variablelist>
714             <refsect2>
715                 <title>Return Value</title>
716                 <para>Возвращет true в случае успеха и false в случае неудачи</para>
717             </refsect2>
718         </refsect1>
719         <refsect1>
720             <title>See also</title>
721             <para>
722                 <link linkend="stargazer.get_tariffs"><function>stargazer.get_tariffs</function></link>,
723                 <link linkend="stargazer.get_tariff"><function>stargazer.get_tariff</function></link>,
724                 <link linkend="stargazer.add_tariff"><function>stargazer.add_tariff</function></link>,
725                 <link linkend="stargazer.del_tariff"><function>stargazer.del_tariff</function></link>
726             </para>
727         </refsect1>
728     </refentry>
729 </chapter>