github.com/tada-team/tdproto@v1.51.57/billing_tariff.go (about)

     1  package tdproto
     2  
     3  import "time"
     4  
     5  // Tariff struct of billing API
     6  type TariffBilling struct {
     7  	// Tariff id
     8  	Id string `json:"id"`
     9  
    10  	// Name of tariff
    11  	Name string `json:"name"`
    12  
    13  	// Nomenclature name of tariff
    14  	NomenclatureName string `json:"nomenclature_name"`
    15  
    16  	// Description of tariff
    17  	Description string `json:"description"`
    18  
    19  	// Benefit of tariff
    20  	Benefit string `json:"benefit,omitempty"`
    21  
    22  	// Currency of tariff
    23  	Currency Currency `json:"currency"`
    24  
    25  	// Priority of tariff
    26  	Priority uint32 `json:"priority,omitempty"`
    27  
    28  	// Cost of one workplace
    29  	CostWorkplace float64 `json:"cost_workplace"`
    30  
    31  	// Count of maximum workspaces on tariff
    32  	MaxWorkplaceCount uint32 `json:"max_workplace_count,omitempty"`
    33  
    34  	// Count of minimum workspaces on tariff
    35  	MinWorkplaceCount uint32 `json:"min_workplace_count,omitempty"`
    36  
    37  	// Count of free workspaces
    38  	FreeWorkplaceCount uint32 `json:"free_workplace_count"`
    39  
    40  	// Minimum step of change count workspaces on tariff
    41  	StepIncreasingWorkplaces uint32 `json:"step_increasing_workplaces"`
    42  
    43  	// Disk space limit per user
    44  	DiskSpaceQuotaMb float64 `json:"disk_space_quota_mb"`
    45  
    46  	// Number of paid days
    47  	PeriodDays uint32 `json:"period_days"`
    48  
    49  	// Maximum count of users in voice conference
    50  	MaxVoiceUser uint32 `json:"max_voice_user"`
    51  
    52  	// Maximum count of users in video conference
    53  	MaxVideoUser uint32 `json:"max_video_user"`
    54  
    55  	// Bitrate of video in video co
    56  	VideoCallBitrate uint32 `json:"video_call_bitrate"`
    57  
    58  	// Bitrate of video in video sharing
    59  	VideoSharingBitrate uint32 `json:"video_sharing_bitrate"`
    60  
    61  	// Flag of availability of free seats when exceeding FreeWorkplace
    62  	IsFree bool `json:"is_free"`
    63  
    64  	// Flag of publicity
    65  	IsPublic bool `json:"is_public"`
    66  
    67  	// Default tariff flag that is set when registering an account
    68  	IsDefault bool `json:"is_default"`
    69  
    70  	// Date of opening tariff
    71  	OpenDate *time.Time `json:"open_date"`
    72  
    73  	// Date of closing tariff
    74  	CloseDate *time.Time `json:"close_date,omitempty"`
    75  
    76  	// Status of tariff
    77  	Status TariffStatus `json:"status"`
    78  }
    79  
    80  // Request to create the tariff
    81  type CreateTariffRequest struct {
    82  	// Name of tariff
    83  	Name string `json:"name"`
    84  
    85  	// Nomenclature name of tariff
    86  	NomenclatureName string `json:"nomenclature_name"`
    87  
    88  	// Description of tariff
    89  	Description string `json:"description,omitempty"`
    90  
    91  	// Benefit of tariff
    92  	Benefit string `json:"benefit,omitempty"`
    93  
    94  	// Currency of tariff
    95  	Currency Currency `json:"currency"`
    96  
    97  	// Cost of one workplace
    98  	CostWorkplace string `json:"cost_workplace"`
    99  
   100  	// Priority of tariff
   101  	Priority uint32 `json:"priority,omitempty"`
   102  
   103  	// Count of maximum workspaces on tariff
   104  	MaxWorkplaceCount uint32 `json:"max_workplace_count,omitempty"`
   105  
   106  	// Count of minimum workspaces on tariff
   107  	MinWorkplaceCount uint32 `json:"min_workplace_count,omitempty"`
   108  
   109  	// Count of free workspaces
   110  	FreeWorkplaceCount uint32 `json:"free_workplace_countt,omitempty"`
   111  
   112  	// Minimum step of change count workspaces on tariff
   113  	StepIncreasingWorkplaces uint32 `json:"step_increasing_workplaces,omitempty"`
   114  
   115  	// Disk space limit per user
   116  	DiskSpaceQuotaMb string `json:"disk_space_quota_mb,omitempty"`
   117  
   118  	// Number of paid days
   119  	PeriodDays uint32 `json:"period_days"`
   120  
   121  	// Maximum count of users in voice conference
   122  	MaxVoiceUser uint32 `json:"max_voice_user,omitempty"`
   123  
   124  	// Maximum count of users in video conference
   125  	MaxVideoUser uint32 `json:"max_video_user,omitempty"`
   126  
   127  	// Bitrate of video in video co
   128  	VideoCallBitrate uint32 `json:"video_call_bitrate,omitempty"`
   129  
   130  	// Bitrate of video in video sharing
   131  	VideoSharingBitrate uint32 `json:"video_sharing_bitrate,omitempty"`
   132  
   133  	// Flag of availability of free seats when exceeding FreeWorkplace
   134  	IsFree bool `json:"is_free,omitempty"`
   135  
   136  	// Flag of publicity
   137  	IsPublic bool `json:"is_public,omitempty"`
   138  
   139  	// Default tariff flag that is set when registering an account
   140  	IsDefault bool `json:"is_default,omitempty"`
   141  
   142  	// Date of opening tariff
   143  	OpenDate *time.Time `json:"open_date,omitempty"`
   144  }
   145  
   146  // Request to update the tariff
   147  type UpdateTariffRequest struct {
   148  	// Tariff id
   149  	TariffId string `json:"tariff_id"`
   150  
   151  	// Date of closing tariff
   152  	CloseDate *time.Time `json:"close_date,omitempty"`
   153  
   154  	// Default tariff flag that is set when registering an account
   155  	IsDefault bool `json:"is_default,omitempty"`
   156  
   157  	// Status of tariff
   158  	Status TariffStatus `json:"status,omitempty"`
   159  }
   160  
   161  // Response from getting a list of tariffs
   162  type GetTariffsListResponse struct {
   163  	TariffList []TariffBilling `json:"tariff_list"`
   164  }
   165  
   166  // Response from getting a list of active tariffs
   167  type GetActiveTariffsListResponse struct {
   168  	TariffList []TariffBilling `json:"tariff_list"`
   169  }