Skip to content

Commit

Permalink
0.8.1: update a contact from a data dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Bendtsen committed Jan 9, 2025
1 parent b35ae9f commit c947842
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Binary file added dist/dolibarrpy-0.8.1.tar.gz
Binary file not shown.
15 changes: 15 additions & 0 deletions dolibarrpy/Dolibarrpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,21 @@ def get_some_contacts_categories_by_cid(self, objid, from_ContactFilter = None,
result = self.call_list_api(api_path, params)
return result

def update_contact_by_tid(self, objid, updateContactModel):
"""
@endpoint 'put /contacts/{id}'
Update contact
@id int Id of contact to update
@updateContactModel str updateContactModel {request_data (Array[string], optional): Datas }
@return: contact
"""
if self.debug:
ic()
ic(objid)
ic(updateContactModel)
result = self.call_update_api('contacts', objid,updateContactModel )
return result

# SUBSCRIPTIONS
def find_all_subscriptions(self, from_SubscriptionFilter = None):
"""
Expand Down
2 changes: 1 addition & 1 deletion implementation_status.csv
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
0 post /contacts
0 delete /contacts/{id}
1 get /contacts/{id}
0 put /contacts/{id}
1 put /contacts/{id}
1 get /contacts/{id}/categories
0 delete /contacts/{id}/categories/{category_id}
0 put /contacts/{id}/categories/{category_id}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
setup(
name='dolibarrpy',
packages=['dolibarrpy'],
version="0.8.0",
version="0.8.1",
license='MIT',
description='Python wrapper for Dolibarr API',
long_description='This project is a python wrapper for the API for Dolibarr ERP & CRM found at dolibarr.org. It is not yet complete, but most major GET endpoints has been implemented. In the beginning I will mostly focus on implementing the API endpoints that I use.',
Expand Down

0 comments on commit c947842

Please sign in to comment.