本文整理汇总了Python中eums.services.contact_service.ContactService.build_rapid_pro_contact_fields方法的典型用法代码示例。如果您正苦于以下问题:Python ContactService.build_rapid_pro_contact_fields方法的具体用法?Python ContactService.build_rapid_pro_contact_fields怎么用?Python ContactService.build_rapid_pro_contact_fields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eums.services.contact_service.ContactService
的用法示例。
在下文中一共展示了ContactService.build_rapid_pro_contact_fields方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_build_rapid_pro_contact
# 需要导入模块: from eums.services.contact_service import ContactService [as 别名]
# 或者: from eums.services.contact_service.ContactService import build_rapid_pro_contact_fields [as 别名]
def generate_build_rapid_pro_contact(self, contact):
return {
'name': 'Jack Bob',
'groups': [{'name': 'EUMS', 'uuid': '362bcb66-6f2e-4899-b78b-187309bdf636'}],
'urns': ['tel:%s' % contact.get('phone')],
'fields': ContactService.build_rapid_pro_contact_fields(contact)
}
示例2: generate_get_rapid_pro_contact_response
# 需要导入模块: from eums.services.contact_service import ContactService [as 别名]
# 或者: from eums.services.contact_service.ContactService import build_rapid_pro_contact_fields [as 别名]
def generate_get_rapid_pro_contact_response(self, contact):
return {
"results": [
{
"uuid": "52fa33e7-da32-4703-8feb-aa5114dc1a8b",
"name": "Jack Bob",
"urns": [
"tel:%s" % contact.get('phone')
],
"fields": ContactService.build_rapid_pro_contact_fields(contact)
}
]
}
示例3: generate_add_or_update_rapid_pro_contact_response
# 需要导入模块: from eums.services.contact_service import ContactService [as 别名]
# 或者: from eums.services.contact_service.ContactService import build_rapid_pro_contact_fields [as 别名]
def generate_add_or_update_rapid_pro_contact_response(self, contact):
return {
"uuid": "e5de51c0-844b-4feb-8023-33b180bdf965",
"name": "Jack Bob",
"language": None,
"group_uuids": ["fbc775f2-03e3-428e-93a2-608d7a7b46dc"],
"urns": ["tel:%s" % contact.get('phone')],
"fields": ContactService.build_rapid_pro_contact_fields(contact),
"blocked": False,
"failed": False,
"modified_on": "2016-03-07T09:09:46.429Z",
"phone": contact.get('phone'),
"groups": ['EUMS']
}