def create_contact(contact, connection): property_type_by_property_name = \ get_property_type_by_property_name(connection) contact_data = format_contact_data_for_saving( contact, property_type_by_property_name, ) response = connection.send_post_request( _CONTACT_CREATING_URL_PATH, contact_data, ) return response["vid"]
def create_contact(contact, connection): property_type_by_property_name = \ get_property_type_by_property_name(connection) contact_data = format_contact_data_for_saving( contact, property_type_by_property_name, ) response = connection.send_post_request( _CONTACT_CREATING_URL_PATH, contact_data, ) return response["vid"]
def __call__(self): api_calls = self._available_properties_simulator() request_body_deserialization = format_contact_data_for_saving( self._contact, self._property_type_by_property_name, ) api_call = UnsuccessfulAPICall( CONTACTS_API_SCRIPT_NAME + '/contact/', 'POST', request_body_deserialization=request_body_deserialization, exception=self._exception ) api_calls.append(api_call) return api_calls
def __call__(self): api_calls = self._available_properties_simulator() request_body_deserialization = format_contact_data_for_saving( self._contact, self._property_type_by_property_name, ) api_call = UnsuccessfulAPICall( CONTACTS_API_SCRIPT_NAME + '/contact/', 'POST', request_body_deserialization=request_body_deserialization, exception=self._exception ) api_calls.append(api_call) return api_calls