本文整理汇总了Python中openprovider.modules.E.handle方法的典型用法代码示例。如果您正苦于以下问题:Python E.handle方法的具体用法?Python E.handle怎么用?Python E.handle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openprovider.modules.E
的用法示例。
在下文中一共展示了E.handle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: retrieve_customer
# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import handle [as 别名]
def retrieve_customer(self, handle, with_additional_data=False):
"""Retrieve information of an existing customer."""
response = self.request(E.retrieveCustomerRequest(
E.handle(handle),
E.withAdditionalData(int(with_additional_data)),
))
return response.as_model(Customer)
示例2: modify_customer
# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import handle [as 别名]
def modify_customer(self, handle, address, phone, email=None, vat=None, fax=None,
company_name=None, additional_data={}):
"""Modify a customer."""
self.request(E.modifyCustomerRequest(
E.handle(handle),
E.vat(vat or ''),
_get_phone_xml('phone', phone),
_get_phone_xml('fax', fax),
E.address(
E.street(address.street),
E.number(address.number),
E.suffix(address.suffix or ''),
E.zipcode(address.zipcode),
E.city(address.city),
E.state(address.state or ''),
E.country(address.country),
),
E.email(email or ''),
E.additionalData(*[E(key, value) for key, value in additional_data.items()]),
))
return True
示例3: delete_customer
# 需要导入模块: from openprovider.modules import E [as 别名]
# 或者: from openprovider.modules.E import handle [as 别名]
def delete_customer(self, handle):
"""Delete a customer."""
self.request(E.deleteCustomerRequest(E.handle(handle)))
return True