@@ -1157,7 +1157,7 @@ def create_contact(self,
11571157 send_email : bool = False
11581158 ):
11591159 """
1160- https://vacasa.docs.stoplight.io/contacts/postv1contacts
1160+ https://connect. vacasa.com/#tag/Contacts/paths/~1v1~1contacts/post
11611161
11621162 Args:
11631163 first_name: First name of the contact
@@ -1210,22 +1210,77 @@ def create_contact(self,
12101210 def update_contact (self , contact_id , params : dict ):
12111211
12121212 """
1213- Update a unit via connect.
1214- https://vacasa.docs.stoplight.io/contacts/patchv1contactsid
1213+ Update a contact via connect.
1214+ https://connect. vacasa.com/#tag/Contacts/paths/~1v1~1contacts/patch
12151215
12161216 Args:
12171217 contact_id: ID of the contact to update
12181218 params: A dict of key value pairs to update.
12191219
12201220 Returns: dict
1221- updated unit
1221+ updated contact
12221222
12231223 """
12241224
12251225 url = f"{ self .endpoint } /v1/contacts/{ contact_id } "
12261226 return self ._patch (url , json = {'data' : {'attributes' : params }}, headers = self ._headers ()).json ()
12271227
12281228
1229+ def update_contact_finances (self ,
1230+ contact_id ,
1231+ account_name : str = None ,
1232+ account_number : str = None ,
1233+ routing_number : str = None ,
1234+ tax_id : str = None ,
1235+ tax_entity_name : str = None ,
1236+ tax_form_code_id : int = 0 ):
1237+
1238+ """
1239+ Update a contacts finances via connect.
1240+ https://connect.vacasa.com/#tag/Contacts/paths/~1v1~1contacts~1{id}~1finances/patch
1241+
1242+ Args:
1243+ contact_id: ID of the contact to update
1244+ account_name: Bank Account Name (<= 100 Chars)
1245+ account_number: Bank Account Number (<= 25 Chars)
1246+ routing_number: Bank Routing Number (<= 20 Chars)
1247+ tax_id: Tax Identification (<= 11 Chars)
1248+ tax_entity_name: Tax Name (<= 100 Chars)
1249+ tax_form_code_id:
1250+
1251+
1252+ Returns: None
1253+ Sensitve data.. no result (HTTP-204)
1254+
1255+ """
1256+ return self .update_contact_finances_payload (contact_id , dict (
1257+ account_name = account_name ,
1258+ account_number = account_number ,
1259+ routing_number = routing_number ,
1260+ tax_id = tax_id ,
1261+ tax_entity_name = tax_entity_name ,
1262+ tax_form_code_id = tax_form_code_id ))
1263+
1264+ def update_contact_finances_payload (self , contact_id , params : dict ):
1265+
1266+ """
1267+ Update a contacts finances via connect.
1268+ https://connect.vacasa.com/#tag/Contacts/paths/~1v1~1contacts~1{id}~1finances/patch
1269+
1270+ Args:
1271+ contact_id: ID of the contact to update
1272+ params: A dict of key value pairs to update.
1273+
1274+ Returns: None
1275+ Sensitve data.. no result (HTTP-204)
1276+
1277+ """
1278+
1279+ url = f"{ self .endpoint } /v1/contacts/{ contact_id } /finances"
1280+ return self ._patch (url , json = {'data' : {'attributes' : params }}, headers = self ._headers ()).json ()
1281+
1282+
1283+
12291284def _trip_protection_to_integer (trip_protection : bool ) -> int :
12301285 """Convert from True/False/None to 1/0/-1"""
12311286 if trip_protection is None :
0 commit comments