Handling account

fetch acount

We have various functions to acquire data from our account The first one shows the user name with who we are working

fetch_account(token)

fetch properties

The following shows a list of properties that belong to this account We have to note that one of the displayed data is the lcode of each property. This will help us to work with an accommodation in particular

fetch_properties(token)

If we want to display the data of a particular property we would have to write the following considering that the lcode shown is the one shown before

fetch_property(token, lcode)

update properties

Finally if you want to modify any of the data shown above should use the following function:

update_property(token, lcode, dict)

where it says dict, it is a dictionary with the data we’d like to change on the property, for example

s.update_property(token, lcode, {‘name’: ‘Aeca’, ‘country’: ‘ES’})

country is a field that is always both here and on customer with as indicative ISO country code.