huaweicloud-sdk-python-v3/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/customer_order_v2.py

460 lines
17 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
import pprint
import re
import six
class CustomerOrderV2:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'order_id': 'str',
'customer_id': 'str',
'service_type_code': 'str',
'source_type': 'int',
'status': 'int',
'order_type': 'int',
'amount_after_discount': 'float',
'official_amount': 'float',
'measure_id': 'int',
'create_time': 'str',
'payment_time': 'str',
'currency': 'str',
'contract_id': 'str',
'amount_info': 'AmountInfomationV2'
}
attribute_map = {
'order_id': 'order_id',
'customer_id': 'customer_id',
'service_type_code': 'service_type_code',
'source_type': 'source_type',
'status': 'status',
'order_type': 'order_type',
'amount_after_discount': 'amount_after_discount',
'official_amount': 'official_amount',
'measure_id': 'measure_id',
'create_time': 'create_time',
'payment_time': 'payment_time',
'currency': 'currency',
'contract_id': 'contract_id',
'amount_info': 'amount_info'
}
def __init__(self, order_id=None, customer_id=None, service_type_code=None, source_type=None, status=None, order_type=None, amount_after_discount=None, official_amount=None, measure_id=None, create_time=None, payment_time=None, currency=None, contract_id=None, amount_info=None):
"""CustomerOrderV2 - a model defined in huaweicloud sdk"""
self._order_id = None
self._customer_id = None
self._service_type_code = None
self._source_type = None
self._status = None
self._order_type = None
self._amount_after_discount = None
self._official_amount = None
self._measure_id = None
self._create_time = None
self._payment_time = None
self._currency = None
self._contract_id = None
self._amount_info = None
self.discriminator = None
if order_id is not None:
self.order_id = order_id
if customer_id is not None:
self.customer_id = customer_id
if service_type_code is not None:
self.service_type_code = service_type_code
if source_type is not None:
self.source_type = source_type
if status is not None:
self.status = status
if order_type is not None:
self.order_type = order_type
if amount_after_discount is not None:
self.amount_after_discount = amount_after_discount
if official_amount is not None:
self.official_amount = official_amount
if measure_id is not None:
self.measure_id = measure_id
if create_time is not None:
self.create_time = create_time
if payment_time is not None:
self.payment_time = payment_time
if currency is not None:
self.currency = currency
if contract_id is not None:
self.contract_id = contract_id
if amount_info is not None:
self.amount_info = amount_info
@property
def order_id(self):
"""Gets the order_id of this CustomerOrderV2.
|参数名称订单ID。| |参数约束及描述订单ID。|
:return: The order_id of this CustomerOrderV2.
:rtype: str
"""
return self._order_id
@order_id.setter
def order_id(self, order_id):
"""Sets the order_id of this CustomerOrderV2.
|参数名称订单ID。| |参数约束及描述订单ID。|
:param order_id: The order_id of this CustomerOrderV2.
:type: str
"""
self._order_id = order_id
@property
def customer_id(self):
"""Gets the customer_id of this CustomerOrderV2.
|参数名称客户ID。| |参数约束及描述客户ID。|
:return: The customer_id of this CustomerOrderV2.
:rtype: str
"""
return self._customer_id
@customer_id.setter
def customer_id(self, customer_id):
"""Sets the customer_id of this CustomerOrderV2.
|参数名称客户ID。| |参数约束及描述客户ID。|
:param customer_id: The customer_id of this CustomerOrderV2.
:type: str
"""
self._customer_id = customer_id
@property
def service_type_code(self):
"""Gets the service_type_code of this CustomerOrderV2.
|参数名称云服务类型编码例如ECS的云服务类型编码为“hws.service.type.ec2”。具体请参见云服务类型云服务类型云服务类型云服务类型。| |参数约束及描述云服务类型编码例如ECS的云服务类型编码为“hws.service.type.ec2”。具体请参见云服务类型云服务类型云服务类型云服务类型。|
:return: The service_type_code of this CustomerOrderV2.
:rtype: str
"""
return self._service_type_code
@service_type_code.setter
def service_type_code(self, service_type_code):
"""Sets the service_type_code of this CustomerOrderV2.
|参数名称云服务类型编码例如ECS的云服务类型编码为“hws.service.type.ec2”。具体请参见云服务类型云服务类型云服务类型云服务类型。| |参数约束及描述云服务类型编码例如ECS的云服务类型编码为“hws.service.type.ec2”。具体请参见云服务类型云服务类型云服务类型云服务类型。|
:param service_type_code: The service_type_code of this CustomerOrderV2.
:type: str
"""
self._service_type_code = service_type_code
@property
def source_type(self):
"""Gets the source_type of this CustomerOrderV2.
|参数名称客户订单订单来源类型1客户2代理3合同4分销商| |参数的约束及描述客户订单订单来源类型1客户2代理3合同4分销商|
:return: The source_type of this CustomerOrderV2.
:rtype: int
"""
return self._source_type
@source_type.setter
def source_type(self, source_type):
"""Sets the source_type of this CustomerOrderV2.
|参数名称客户订单订单来源类型1客户2代理3合同4分销商| |参数的约束及描述客户订单订单来源类型1客户2代理3合同4分销商|
:param source_type: The source_type of this CustomerOrderV2.
:type: int
"""
self._source_type = source_type
@property
def status(self):
"""Gets the status of this CustomerOrderV2.
|参数名称订单状态1待审核3处理中4已取消5已完成6待支付9待确认| |参数的约束及描述订单状态1待审核3处理中4已取消5已完成6待支付9待确认|
:return: The status of this CustomerOrderV2.
:rtype: int
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this CustomerOrderV2.
|参数名称订单状态1待审核3处理中4已取消5已完成6待支付9待确认| |参数的约束及描述订单状态1待审核3处理中4已取消5已完成6待支付9待确认|
:param status: The status of this CustomerOrderV2.
:type: int
"""
self._status = status
@property
def order_type(self):
"""Gets the order_type of this CustomerOrderV2.
|参数名称订单类型1开通2续订3变更4退订10包周期转按需11按需转包周期12赠送13试用14转商用15费用调整| |参数的约束及描述订单类型1开通2续订3变更4退订10包周期转按需11按需转包周期12赠送13试用14转商用15费用调整|
:return: The order_type of this CustomerOrderV2.
:rtype: int
"""
return self._order_type
@order_type.setter
def order_type(self, order_type):
"""Sets the order_type of this CustomerOrderV2.
|参数名称订单类型1开通2续订3变更4退订10包周期转按需11按需转包周期12赠送13试用14转商用15费用调整| |参数的约束及描述订单类型1开通2续订3变更4退订10包周期转按需11按需转包周期12赠送13试用14转商用15费用调整|
:param order_type: The order_type of this CustomerOrderV2.
:type: int
"""
self._order_type = order_type
@property
def amount_after_discount(self):
"""Gets the amount_after_discount of this CustomerOrderV2.
|参数名称:订单优惠后金额(不含券不含卡的实付价格)。| |参数的约束及描述:订单优惠后金额(不含券不含卡的实付价格)。|
:return: The amount_after_discount of this CustomerOrderV2.
:rtype: float
"""
return self._amount_after_discount
@amount_after_discount.setter
def amount_after_discount(self, amount_after_discount):
"""Sets the amount_after_discount of this CustomerOrderV2.
|参数名称:订单优惠后金额(不含券不含卡的实付价格)。| |参数的约束及描述:订单优惠后金额(不含券不含卡的实付价格)。|
:param amount_after_discount: The amount_after_discount of this CustomerOrderV2.
:type: float
"""
self._amount_after_discount = amount_after_discount
@property
def official_amount(self):
"""Gets the official_amount of this CustomerOrderV2.
|参数名称订单金额官网价。退订订单中该金额等于amount。| |参数的约束及描述订单金额官网价。退订订单中该金额等于amount。|
:return: The official_amount of this CustomerOrderV2.
:rtype: float
"""
return self._official_amount
@official_amount.setter
def official_amount(self, official_amount):
"""Sets the official_amount of this CustomerOrderV2.
|参数名称订单金额官网价。退订订单中该金额等于amount。| |参数的约束及描述订单金额官网价。退订订单中该金额等于amount。|
:param official_amount: The official_amount of this CustomerOrderV2.
:type: float
"""
self._official_amount = official_amount
@property
def measure_id(self):
"""Gets the measure_id of this CustomerOrderV2.
|参数名称订单金额度量单位1元2角3分| |参数的约束及描述订单金额度量单位1元2角3分|
:return: The measure_id of this CustomerOrderV2.
:rtype: int
"""
return self._measure_id
@measure_id.setter
def measure_id(self, measure_id):
"""Sets the measure_id of this CustomerOrderV2.
|参数名称订单金额度量单位1元2角3分| |参数的约束及描述订单金额度量单位1元2角3分|
:param measure_id: The measure_id of this CustomerOrderV2.
:type: int
"""
self._measure_id = measure_id
@property
def create_time(self):
"""Gets the create_time of this CustomerOrderV2.
|参数名称:创建时间 。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。| |参数约束及描述:创建时间 。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。|
:return: The create_time of this CustomerOrderV2.
:rtype: str
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
"""Sets the create_time of this CustomerOrderV2.
|参数名称:创建时间 。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。| |参数约束及描述:创建时间 。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。|
:param create_time: The create_time of this CustomerOrderV2.
:type: str
"""
self._create_time = create_time
@property
def payment_time(self):
"""Gets the payment_time of this CustomerOrderV2.
|参数名称支付时间。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。| |参数约束及描述支付时间。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。|
:return: The payment_time of this CustomerOrderV2.
:rtype: str
"""
return self._payment_time
@payment_time.setter
def payment_time(self, payment_time):
"""Sets the payment_time of this CustomerOrderV2.
|参数名称支付时间。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。| |参数约束及描述支付时间。UTC时间格式yyyy-MM-ddTHH:mm:ssZ如“2019-05-06T08:05:01Z”。其中HH范围是023mm和ss范围是059。|
:param payment_time: The payment_time of this CustomerOrderV2.
:type: str
"""
self._payment_time = payment_time
@property
def currency(self):
"""Gets the currency of this CustomerOrderV2.
|参数名称:货币编码。| |参数约束及描述货币编码。如CNY|
:return: The currency of this CustomerOrderV2.
:rtype: str
"""
return self._currency
@currency.setter
def currency(self, currency):
"""Sets the currency of this CustomerOrderV2.
|参数名称:货币编码。| |参数约束及描述货币编码。如CNY|
:param currency: The currency of this CustomerOrderV2.
:type: str
"""
self._currency = currency
@property
def contract_id(self):
"""Gets the contract_id of this CustomerOrderV2.
|参数名称合同ID。| |参数约束及描述合同ID。|
:return: The contract_id of this CustomerOrderV2.
:rtype: str
"""
return self._contract_id
@contract_id.setter
def contract_id(self, contract_id):
"""Sets the contract_id of this CustomerOrderV2.
|参数名称合同ID。| |参数约束及描述合同ID。|
:param contract_id: The contract_id of this CustomerOrderV2.
:type: str
"""
self._contract_id = contract_id
@property
def amount_info(self):
"""Gets the amount_info of this CustomerOrderV2.
:return: The amount_info of this CustomerOrderV2.
:rtype: AmountInfomationV2
"""
return self._amount_info
@amount_info.setter
def amount_info(self, amount_info):
"""Sets the amount_info of this CustomerOrderV2.
:param amount_info: The amount_info of this CustomerOrderV2.
:type: AmountInfomationV2
"""
self._amount_info = amount_info
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, CustomerOrderV2):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other