admin管理员组文章数量:1404927
the documentation shows how to set the display_name
but not the first and last names!
from what I can find, setting the first and last name is only possible through the web interface, which is not practical since I have many clients to update, and I want to write a python script to automate this task!
this is a code example:
from msgraph import GraphServiceClient
from msgraph.generated.models.booking_customer import BookingCustomer
from msgraph.generated.models.physical_address import PhysicalAddress
from msgraph.generated.models.phone import Phone
from msgraph.generated.models.phone_type import PhoneType
graph_client = self.app_client
request_body = BookingCustomer(
odata_type = "#microsoft.graph.bookingCustomer",
display_name = "Joni Sherman",
email_address = "[email protected]",
addresses = [
PhysicalAddress(
street = "4567 Main Street",
city = "Buffalo",
state = "NY",
country_or_region = "USA",
postal_code = "98052",
),
],
phones = [
Phone(
number = "206-555-0100",
type = PhoneType.Mobile,
)
],
)
try:
result = await graph_client.solutions.booking_businesses.by_booking_business_id(BOOKING_BUSINESS_ID).customers.post(request_body)
return result
except APIError as e:
print(f'Error: {e}')
Note that I tried adding firstName
and lastName
but it doesn't work!
本文标签: pythonHow to set names in a new bookingCustomer (Microsoft Bookings)Stack Overflow
版权声明:本文标题:python - How to set names in a new bookingCustomer (Microsoft Bookings) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744860303a2629029.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论