Esempio n. 1
0
def bookings_id_notifications_post(accept_language,
                                   api,
                                   api_version,
                                   maas_id,
                                   id,
                                   body=None,
                                   addressed_to=None):  # noqa: E501
    """bookings_id_notifications_post

    notification between MaaS provider and Transport operator in case of user no-show or if specific asset is not available or some other event occurs not covered by other API calls. # noqa: E501

    :param accept_language: A list of the languages/localizations the user would like to see the results in. For user privacy and ease of use on the TO side, this list should be kept as short as possible, ideally just one language tag from the list in operator/information
    :type accept_language: str
    :param api: API description, can be TOMP or maybe other (specific/derived) API definitions
    :type api: str
    :param api_version: Version of the API.
    :type api_version: str
    :param maas_id: The ID of the sending maas operator
    :type maas_id: str
    :param id: Booking identifier
    :type id: str
    :param body: 
    :type body: dict | bytes
    :param addressed_to: The ID of the maas operator that has to receive this message
    :type addressed_to: str

    :rtype: None
    """
    if connexion.request.is_json:
        body = Notification.from_dict(
            connexion.request.get_json())  # noqa: E501
    return 'do some magic!'
    def test_send_notification_user(self):
        """Test case for send_notification_user

        Send notification to the user
        """
        body = Notification()
        response = self.client.open('/notification/user',
                                    method='POST',
                                    data=json.dumps(body),
                                    content_type='application/json')
        self.assert200(response,
                       'Response body is : ' + response.data.decode('utf-8'))
Esempio n. 3
0
    def test_bookings_id_notifications_post(self):
        """Test case for bookings_id_notifications_post

        
        """
        body = Notification()
        headers = [('accept_language', 'accept_language_example'),
                   ('api', 'api_example'),
                   ('api_version', 'api_version_example'),
                   ('maas_id', 'maas_id_example'),
                   ('addressed_to', 'addressed_to_example')]
        response = self.client.open(
            '/bookings/{id}/notifications'.format(id='id_example'),
            method='POST',
            data=json.dumps(body),
            headers=headers,
            content_type='application/json')
        self.assert200(response,
                       'Response body is : ' + response.data.decode('utf-8'))