Ejemplo n.º 1
0
    def read(cls, id, criteria=None):
        """
        Returns objects of type App by id and optional criteria
        @param str id
        @param dict criteria
        @return instance of App
        @raise ApiException: raised an exception from the response status
        """
        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if criteria:
            if (isinstance(criteria, RequestMap)):
                mapObj.setAll(criteria.getObject())
            else:
                mapObj.setAll(criteria)

        return BaseObject.execute("3de9977e-ee9d-4239-a27d-8d37e79accd9", App(mapObj))
Ejemplo n.º 2
0
    def read(cls, id, criteria=None):
        """
        Returns objects of type User by id and optional criteria
        @param str id
        @param dict criteria
        @return instance of User
        """
        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if criteria:
            if (isinstance(criteria, RequestMap)):
                mapObj.setAll(criteria.getObject())
            else:
                mapObj.setAll(criteria)

        return BaseObject.execute("7bd54cb3-740a-46a8-ba73-a7116d7fbfa5",
                                  User(mapObj))
Ejemplo n.º 3
0
    def read(cls, id, criteria=None):
        """
		Returns objects of type Node by id and optional criteria
		@param str id
		@param dict criteria
		@return instance of Node
		@raise ApiException: raised an exception from the response status
		"""
        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if criteria:
            if (isinstance(criteria, RequestMap)):
                mapObj.setAll(criteria.getObject())
            else:
                mapObj.setAll(criteria)

        return BaseObject.execute("7257dc46-3f6c-4ff3-a119-da1135d4bc96",
                                  Node(mapObj))
    def read(cls, id, criteria=None):
        """
		Returns objects of type TerminationInquiryHistoryRequest by id and optional criteria
		@param str id
		@param dict criteria
		@return instance of TerminationInquiryHistoryRequest
		@raise ApiException: raised an exception from the response status
		"""
        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if criteria:
            if (isinstance(criteria, RequestMap)):
                mapObj.setAll(criteria.getObject())
            else:
                mapObj.setAll(criteria)

        return BaseObject.execute("fcae4efd-1761-4c7a-8058-a4cf809e12c2",
                                  TerminationInquiryHistoryRequest(mapObj))
Ejemplo n.º 5
0
    def deleteById(cls, id, map=None):
        """
        Delete object of type MultiplePathUserPost by id

        @param str id
        @return MultiplePathUserPost of the response of the deleted instance.
        """

        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if map:
            if (isinstance(map, RequestMap)):
                mapObj.setAll(map.getObject())
            else:
                mapObj.setAll(map)

        return BaseObject.execute("7d0317ff-5d7d-427b-abd2-9df62d5becb7",
                                  MultiplePathUserPost(mapObj))
Ejemplo n.º 6
0
    def delete204ById(cls, id, map=None):
        """
        Delete object of type User by id

        @param str id
        @return User of the response of the deleted instance.
        """

        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if map:
            if (isinstance(map, RequestMap)):
                mapObj.setAll(map.getObject())
            else:
                mapObj.setAll(map)

        return BaseObject.execute("7223cecd-203a-47b7-85cb-3ddbf9027f33",
                                  User(mapObj))
Ejemplo n.º 7
0
    def delete200ById(cls, id, map=None):
        """
        Delete object of type User by id

        @param str id
        @return User of the response of the deleted instance.
        """

        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if map:
            if (isinstance(map, RequestMap)):
                mapObj.setAll(map.getObject())
            else:
                mapObj.setAll(map)

        return BaseObject.execute("ff6f7de7-08fe-4dc2-8185-1f838dc96197",
                                  User(mapObj))
Ejemplo n.º 8
0
    def deleteById(cls, id, map=None):
        """
        Delete object of type User by id

        @param str id
        @return User of the response of the deleted instance.
        """

        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if map:
            if (isinstance(map, RequestMap)):
                mapObj.setAll(map.getObject())
            else:
                mapObj.setAll(map)

        return BaseObject.execute("32f3baaa-9757-4f56-9ed1-241756206274",
                                  User(mapObj))
Ejemplo n.º 9
0
    def read(cls, id, criteria=None):
        """
        Returns objects of type Block by id and optional criteria
        @param str id
        @param dict criteria
        @return instance of Block
        @raise ApiException: raised an exception from the response status
        """
        mapObj = RequestMap()
        if id:
            mapObj.set("id", id)

        if criteria:
            if (isinstance(criteria, RequestMap)):
                mapObj.setAll(criteria.getObject())
            else:
                mapObj.setAll(criteria)

        return BaseObject.execute("e2929737-7620-429a-bf0d-bd3a6483a4a5",
                                  Block(mapObj))
Ejemplo n.º 10
0
    def test_setAll(self):

        requestMapObj = RequestMap()

        requestMapObj.setAll({
            'user.name':
            ['Naman', 'Kumar', 'Aggarwal', {
                'class': {
                    'id': 1233
                }
            }]
        })
        self.assertEqual(
            requestMapObj.getObject(), {
                "user": {
                    'name':
                    ['Naman', 'Kumar', 'Aggarwal', {
                        'class': {
                            'id': 1233
                        }
                    }]
                }
            })

        requestMapObj.setAll({'employee.name': 'atul'})
        self.assertDictEqual(
            requestMapObj.getObject(), {
                "user": {
                    'name':
                    ['Naman', 'Kumar', 'Aggarwal', {
                        'class': {
                            'id': 1233
                        }
                    }]
                },
                "employee": {
                    "name": "atul"
                }
            })

        requestMapObj = RequestMap()
        requestMapObj.setAll([{
            "user.name": "Naman",
            "user.lastname": "Aggarwal"
        }])
        self.assertEqual(
            requestMapObj.getObject(),
            {"list": [{
                "user": {
                    "name": "Naman",
                    "lastname": "Aggarwal"
                }
            }]})

        #ARIZZINI: check list bug
        requestMapObj = RequestMap()
        requestMapObj.setAll([{
            "id": 1,
            "title": "My Title",
            "body": "some body text",
            "userId": 1
        }])
        self.assertEqual(
            requestMapObj.getObject(), {
                "list": [{
                    "id": 1,
                    "title": "My Title",
                    "body": "some body text",
                    "userId": 1
                }]
            })
        self.assertEqual(requestMapObj.get("list[0].id"), 1)