Ejemplo n.º 1
0
def planning_inquiries_post(accept_language,
                            api,
                            api_version,
                            maas_id,
                            body=None,
                            addressed_to=None):  # noqa: E501
    """planning_inquiries_post

    Returns informative options for the given travel plan. <p>Start time can be defined, but is optional. If startTime is not provided, but required by the third party API, a default value of \"Date.now()\" is used. [from MaaS-API /listing]. During the routing phase this service can be used to check availability without any state changes. <p>In the final check, just before presenting the alternatives to the user, a call should be made using `booking-intent`, requesting the TO to provide booking IDs to reference to during communication with the MP. <p>see (2.1) in the process flow - planning. # 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 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: Planning
    """
    if connexion.request.is_json:
        body = PlanningRequest.from_dict(
            connexion.request.get_json())  # noqa: E501
    return 'do some magic!'
Ejemplo n.º 2
0
    def test_planning_offers_post(self):
        """Test case for planning_offers_post

        
        """
        body = PlanningRequest()
        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('/planning/offers',
                                    method='POST',
                                    data=json.dumps(body),
                                    headers=headers,
                                    content_type='application/json')
        self.assert200(response,
                       'Response body is : ' + response.data.decode('utf-8'))