コード例 #1
0
    def all(self, search_params=None, raw_response=False):
        category_list = "brightpearl-category-search"

        if not search_params:
            search_params = dict()

        return self.connection.make_request("/{}/{}?{}".format(
            self.resource_parent, category_list, url_encode_params(search_params)), "GET", {}, raw_response
        )
コード例 #2
0
    def all(self, search_params, raw_response=False):
        collection_list = "collection-search"
        if not search_params:
            search_params = dict()

        return self.connection.make_request(
            "/{}/{}?{}".format(self.resource_parent, collection_list,
                               url_encode_params(search_params)), "GET", {},
            raw_response)
コード例 #3
0
 def all(self, search_params=None, stream=False):
     """
         Method to get option_values from the brightpearl.
     :param stream: (boolean) - True if the data are to be streamed.
     :return:
     """
     option_value_list = "option-value-search"
     if not search_params:
         search_params = dict()
     return self.connection.make_request(
         "/{}/{}?{}".format(self.resource_parent, option_value_list,
                            url_encode_params(search_params)), "GET", {},
         stream)
コード例 #4
0
 def all(self, search_params=None, stream=False):
     """
         Method to get all the seasoons data from the brightpearl.
     :param stream: (boolean) - True if results are supposed to be streamed.
     :return:
     """
     season_get = "season"
     if not search_params:
         search_params = dict()
     return self.connection.make_request(
         "{}/{}?{}".format(self.resource_parent, season_get,
                           url_encode_params(search_params)), "GET", {},
         stream)
コード例 #5
0
    def all(self, search_params=None, stream=False):
        """
            Method to get all the Brands from the brightpearl.
        :param search_params: (dict) - search filter that is supposed to applied.
        :param stream: (boolean) - True if results are supposed to be streamed.
        :return:
        """
        brand_list = "brand-search"

        if not search_params:
            search_params = dict()

        return self.connection.make_request("/{}/{}?{}".format(
            self.resource_parent, brand_list, url_encode_params(search_params)), "GET", {}, stream
        )