model.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- coding: utf-8 -*-
  2. # !/usr/bin/env python
  3. # Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  11. # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  12. # specific language governing permissions and limitations under the License.
  13. """
  14. This module provide billing information and eip status condition.
  15. """
  16. class Billing(object):
  17. """
  18. billing information
  19. """
  20. def __init__(self, payment_timing=None, billing_method=None, reservation_length=None,
  21. reservation_time_unit=None):
  22. """
  23. :type payment_timing: string
  24. :param payment_timing: The pay time of the payment, default value 'Postpaid'
  25. :type billing_method: string
  26. :param billing_method: The way of lbdc charging, default value 'ByBandwidth'
  27. :type reservation_length: int
  28. :param reservation_length: purchase length
  29. :type reservation_time_unit: string
  30. :param reservation_time_unit: time unit of purchasing, default 'Month'
  31. """
  32. self.payment_timing = payment_timing or 'Postpaid'
  33. self.billing_method = billing_method or 'ByBandwidth'
  34. self.reservation_length = reservation_length or 1
  35. self.reservation_time_unit = reservation_time_unit or 'Month'