本文整理匯總了Python中openprovider.modules.E.address方法的典型用法代碼示例。如果您正苦於以下問題:Python E.address方法的具體用法?Python E.address怎麽用?Python E.address使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類openprovider.modules.E
的用法示例。
在下文中一共展示了E.address方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: create_customer
# 需要導入模塊: from openprovider.modules import E [as 別名]
# 或者: from openprovider.modules.E import address [as 別名]
def create_customer(self, name, gender, address, phone, email, vat=None, fax=None,
company_name=None, additional_data=None, extension_additional_data=None):
"""Create a customer"""
response = self.request(E.createCustomerRequest(
E.companyName(company_name),
E.vat(vat),
E.name(
E.initials(name.initials),
E.firstName(name.first_name),
E.prefix(name.prefix or ''),
E.lastName(name.last_name),
),
E.gender(gender),
_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),
_additional_data(additional_data),
_extension_additional_data(extension_additional_data),
))
return str(response.data.handle)
示例2: modify_customer
# 需要導入模塊: from openprovider.modules import E [as 別名]
# 或者: from openprovider.modules.E import address [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