brandon14/ebay-sdk-php

View on GitHub
src/Buy/Browse/V1/Api/ItemSummaryApi.php

Summary

Maintainability
F
4 days
Test Coverage
<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
 * MIT License
 *
 * Copyright (c) 2022 Brandon Clothier
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

declare(strict_types=1);

/**
 * ItemSummaryApi.
 *
 * PHP version ^7.2 || ^8.0
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */

/**
 * Browse API.
 *
 * <p>The Browse API has the following resources:</p>   <ul> <li><b> item_summary: </b> Lets shoppers search for specific items by keyword, GTIN, category, charity, product, or item aspects and refine the results by using filters, such as aspects, compatibility, and fields values.</li>  <li><b> search_by_image: </b><a href=\"https://developer.ebay.com/api-docs/static/versioning.html#experimental \" target=\"_blank\"><img src=\"/cms/img/docs/experimental-icon.svg\" class=\"legend-icon experimental-icon\" alt=\"Experimental Release\" title=\"Experimental Release\" />&nbsp;(Experimental)</a> Lets shoppers search for specific items by image. You can refine the results by using URI parameters and filters.</li>   <li><b> item: </b> <ul><li>Lets you retrieve the details of a specific item or all the items in an item group, which is an item with variations such as color and size and check if a product is compatible with the specified item, such as if a specific car is compatible with a specific part.</li> <li>Provides a bridge between the eBay legacy APIs, such as <b> Finding</b>, and the RESTful APIs, which use different formats for the item IDs.</li>  </ul> </li>  <li> <b> shopping_cart: </b> <a href=\"https://developer.ebay.com/api-docs/static/versioning.html#experimental \" target=\"_blank\"><img src=\"/cms/img/docs/experimental-icon.svg\" class=\"legend-icon experimental-icon\" alt=\"Experimental Release\" title=\"Experimental Release\" />&nbsp;(Experimental)</a> <a href=\"https://developer.ebay.com/api-docs/static/versioning.html#limited \" target=\"_blank\"> <img src=\"/cms/img/docs/partners-api.svg\" class=\"legend-icon partners-icon\" title=\"Limited Release\"  alt=\"Limited Release\" />(Limited Release)</a> Provides the ability for eBay members to see the contents of their eBay cart, and add, remove, and change the quantity of items in their eBay cart.&nbsp;&nbsp;<b> Note: </b> This resource is not available in the eBay API Explorer.</li></ul>       <p>The <b> item_summary</b>, <b> search_by_image</b>, and <b> item</b> resource calls require an <a href=\"/api-docs/static/oauth-client-credentials-grant.html\">Application access token</a>. The <b> shopping_cart</b> resource calls require a <a href=\"/api-docs/static/oauth-authorization-code-grant.html\">User access token</a>.</p>
 *
 * The version of the OpenAPI document: v1.18.0
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 5.4.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace TNT\Ebay\Buy\Browse\V1\Api;

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Psr7\MultipartStream;
use TNT\Ebay\Buy\Browse\V1\ApiException;
use GuzzleHttp\Exception\GuzzleException;
use TNT\Ebay\Buy\Browse\V1\Configuration;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use TNT\Ebay\Buy\Browse\V1\HeaderSelector;
use TNT\Ebay\Buy\Browse\V1\ObjectSerializer;

/**
 * ItemSummaryApi Class Doc Comment.
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */
class ItemSummaryApi
{
    /**
     * @var ClientInterface
     */
    protected $client;

    /**
     * @var Configuration
     */
    protected $config;

    /**
     * @var HeaderSelector
     */
    protected $headerSelector;

    /**
     * @var int Host index
     */
    protected $hostIndex;

    /**
     * @param ClientInterface $client
     * @param Configuration   $config
     * @param HeaderSelector  $selector
     * @param int             $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
     */
    public function __construct(
        ClientInterface $client = null,
        Configuration $config = null,
        HeaderSelector $selector = null,
        $hostIndex = 0
    ) {
        $this->client = $client ?: new Client();
        $this->config = $config ?: new Configuration();
        $this->headerSelector = $selector ?: new HeaderSelector();
        $this->hostIndex = $hostIndex;
    }

    /**
     * Set the host index.
     *
     * @param int $hostIndex Host index (required)
     */
    public function setHostIndex($hostIndex): void
    {
        $this->hostIndex = $hostIndex;
    }

    /**
     * Get the host index.
     *
     * @return int Host index
     */
    public function getHostIndex()
    {
        return $this->hostIndex;
    }

    /**
     * @return Configuration
     */
    public function getConfiguration()
    {
        return $this->config;
    }

    /**
     * Operation search.
     *
     * @param string $aspect_filter        This field lets you filter by item aspects. The aspect name/value pairs and category, which is required, is used to limit the results to specific aspects of the item. For example, in a clothing category one aspect pair would be Color/Red. &lt;br /&gt;&lt;br /&gt;For example, the method below uses the category ID for Women&#39;s Clothing. This will return only items for a woman&#39;s red shirt.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;category_ids&#x3D;15724&amp;aspect_filter&#x3D;categoryId:15724,Color:{Red}&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;To get a list of the aspect pairs and the category, which is returned in the &lt;b&gt;dominantCategoryId&lt;/b&gt; field, set &lt;b&gt;fieldgroups&lt;/b&gt; to &lt;code&gt;ASPECT_REFINEMENTS&lt;/code&gt;.   &lt;br /&gt;&lt;br /&gt; &lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;amp;fieldgroups&#x3D;ASPECT_REFINEMENTS&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note:&lt;/b&gt; The pipe symbol is used as a delimiter between aspect filter values. If a value contains a pipe symbol (for example, the brand name &#39;Bed|Stü&#39;), you must enter a backslash before the pipe character to prevent it from being evaluated as a delimiter. &lt;br /&gt;&lt;br /&gt;The following example shows the correct format for entering two brand names as aspect filter values, one of which contains a pipe symbol:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?limit&#x3D;50&amp;category_ids&#x3D;3034&amp;filter&#x3D;buyingOptions:{AUCTION|FIXED_PRICE}&amp;aspect_filter&#x3D;categoryId:3034,Brand:{Bed&amp;bsol;|Stü|Nike}&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The category ID is required &lt;i&gt;twice&lt;/i&gt;; once as a URI parameter and as part of the &lt;b&gt; aspect_filter&lt;/b&gt;. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:AspectFilter (optional)
     * @param string $auto_correct         A query parameter that enables auto correction.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;code&gt;KEYWORD&lt;/code&gt; (optional)
     * @param string $category_ids         &lt;a name&#x3D;\&quot;category_ids\&quot;&gt;&lt;/a&gt;The category ID is used to limit the results. This field can have one category ID or a comma separated list of IDs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?category_ids&#x3D;29792&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note: &lt;/b&gt;Currently, you can pass in only one category ID per request.&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;You can also use any combination of the &lt;b&gt; category_Ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, and &lt;b&gt; q&lt;/b&gt; fields. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;For example, let&#39;s say you are looking of a toy phone. If you search for \&quot;phone\&quot;, the result set will be mobile phones because this is the \&quot;Best Match\&quot; for this search. But if you also include the toy category ID, the results will be what you wanted. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;phone&amp;category_ids&#x3D;220&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;The list of eBay category IDs is not published and category IDs are not the same across all the eBay marketplaces. You can use the following techniques to find a category by site: &lt;ul&gt; &lt;li&gt;Use the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellerinformation/news/categorychanges.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Category Changes page&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;Use the Taxonomy API. For details see &lt;a href&#x3D;\&quot;/api-docs/buy/buy-categories.html\&quot;&gt;Get Categories for Buy APIs&lt;/a&gt;. &lt;/li&gt;  &lt;li&gt;Submit the following method to get the &lt;b&gt; dominantCategoryId&lt;/b&gt; for an item. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;&lt;em&gt; keyword&lt;/em&gt;&amp;fieldgroups&#x3D;ASPECT_REFINEMENTS  &lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt; Note:&lt;/b&gt; If a top-level (L1) category is specified, you &lt;b&gt; must&lt;/b&gt; also include the &lt;b&gt; q&lt;/b&gt; query parameter.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $charity_ids          The charity ID is used to limit the results to only items associated with the specified charity. This field can have one charity ID or a comma separated list of IDs. The method will return all the items associated with the specified charities.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;For example:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?charity_ids&#x3D;13-1788491,300108469&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The charity ID is the charity&#39;s registration ID, also known as the Employer Identification Number (EIN). In GB, it is the Charity Registration Number (CRN), commonly called \&quot;Charity Number\&quot;.   &lt;ul&gt;&lt;li&gt;To find the charities eBay supports, you can search for a charity at &lt;a href&#x3D;\&quot;https://charity.ebay.com/search \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Search &lt;/a&gt; or go to &lt;a href&#x3D;\&quot;https://www.ebay.com/b/Charity/bn_7114598164 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Shop&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;To find the charity ID of a specific charity, click on a charity and use the EIN number. For example, the charity ID for  &lt;a href&#x3D;\&quot;https://charity.ebay.com/charity/American-Red-Cross/3843 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;American Red Cross&lt;/a&gt;, is &lt;code&gt;530196605&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt; You  can also use any combination of the &lt;code&gt;category_Ids&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; fields with a &lt;code&gt;charity_Ids&lt;/code&gt; to filter the result set. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restriction: &lt;/b&gt; This is supported only on the US and GB marketplaces.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum: &lt;/b&gt; 20 IDs &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; One ID (optional)
     * @param string $compatibility_filter This field specifies the attributes used to define a specific product. The service searches for items matching the keyword or matching the keyword and a product attribute value in the title of the item.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The only products supported are cars, trucks, and motorcycles.&lt;/span&gt;&lt;br /&gt;For example, if the keyword is &lt;code&gt;brakes&lt;/code&gt; and &lt;code&gt;compatibility-filter&#x3D;Year:2018;Make:BMW&lt;/code&gt;, the items returned are items with brakes, 2018, or BMW in the title.&lt;br /&gt;&lt;br /&gt;The service uses the product attributes to determine whether the item is compatible. The service returns the attributes that are compatible and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.compatibilityMatch\&quot;&gt; CompatibilityMatchEnum&lt;/a&gt; value that indicates how well the item matches the attributes.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#478415\&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt;&lt;/span&gt; See the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#s0-1-21-6-7-7-6-ReturnItemsthatareCompatiblewiththeKeywordandVehicle-9\&quot;&gt;Samples&lt;/a&gt; section for a detailed example.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Best Practice:&lt;/b&gt; Submit all of the &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attributes&lt;/a&gt; for the specific product.&lt;br /&gt;&lt;br /&gt;To find the attributes and values for a specific marketplace, you can use the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/category_tree/methods/getCompatibilityProperties\&quot;&gt;getCompatibilityProperties&lt;/a&gt; method in the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/methods\&quot;&gt;Taxonomy API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For more details, see &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#Check\&quot;&gt;Check compatibility&lt;/a&gt; in the Buy Integration Guide.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Testing in Sandbox is only supported using mock data. See &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#sbox-test\&quot;&gt;Testing search in the Sandbox&lt;/a&gt; for details.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;q&lt;/b&gt; (keyword)&lt;/li&gt;&lt;li&gt;One fitment supported category ID (such as &lt;code&gt;33559&lt;/code&gt; Brakes)&lt;/li&gt;&lt;li&gt;At least one &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attribute&lt;/a&gt; name/value pair&lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:CompatibilityFilter (optional)
     * @param string $epid                 The ePID is the eBay product identifier of a product from the eBay product catalog. This field limits the results to only items in the specified ePID. &lt;br /&gt;&lt;br /&gt;The &lt;b&gt; Marketing&lt;/b&gt; API &lt;b&gt;getMerchandisedProducts&lt;/b&gt; method and the &lt;b&gt;Browse&lt;/b&gt; API &lt;b&gt; getItem&lt;/b&gt;, &lt;b&gt; getItemByLegacyId&lt;/b&gt;, and &lt;b&gt; getItemsByItemGroup&lt;/b&gt; calls return the ePID of the product.  You can also use the &lt;a href&#x3D;\&quot;/api-docs/commerce/catalog/resources/product_summary/methods/search\&quot;&gt;product_summary/search&lt;/a&gt; method in the &lt;b&gt;Catalog&lt;/b&gt; API to search for the ePID of the product. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?epid&#x3D;15032&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Maximum: &lt;/b&gt; 1    &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have  &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;,  &lt;b&gt; gtin&lt;/b&gt;,  or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $fieldgroups          This field is a comma separated list of values that lets you control what is returned in the response. The default is &lt;b&gt; MATCHING_ITEMS&lt;/b&gt;, which returns the items that match the keyword or category specified. The other values return data that can be used to create histograms or provide additional information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt; ASPECT_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.aspectDistributions\&quot;&gt;aspectDistributions&lt;/a&gt; container, which has the &lt;b&gt;dominantCategoryId&lt;/b&gt;, &lt;b&gt;matchCount&lt;/b&gt;, and &lt;b&gt;refinementHref&lt;/b&gt; for the various aspects of the items found. For example, if you searched for &#39;Mustang&#39;, some of the aspect would be &lt;b&gt;Model Year&lt;/b&gt;, &lt;b&gt;Exterior Color&lt;/b&gt;, &lt;b&gt;Vehicle Mileage&lt;/b&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt;Note:&lt;/b&gt; ASPECT_REFINEMENTS are category specific.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;BUYING_OPTION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.buyingOptionDistributions\&quot;&gt;buyingOptionDistributions&lt;/a&gt;  container, which has the &lt;b&gt;matchCount&lt;/b&gt; and &lt;b&gt;refinementHref&lt;/b&gt; for &lt;b&gt;AUCTION&lt;/b&gt;, &lt;b&gt;FIXED_PRICE&lt;/b&gt; (Buy It Now), and &lt;b&gt;CLASSIFIED_AD&lt;/b&gt; items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CATEGORY_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.categoryDistributions\&quot;&gt;categoryDistributions&lt;/a&gt; container, which has the categories that the item is in.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CONDITION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.conditionDistributions\&quot;&gt;conditionDistributions&lt;/a&gt;  container, such as &lt;b&gt;NEW&lt;/b&gt;, &lt;b&gt;USED&lt;/b&gt;, etc. Within these groups are multiple states of the condition. For example, &lt;b&gt;New&lt;/b&gt; can be New without tag, New in box, New without box, etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;EXTENDED&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.shortDescription\&quot;&gt;shortDescription&lt;/a&gt; field, which provides condition and item aspect information and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.itemLocation.city\&quot;&gt;itemLocation.city&lt;/a&gt; field.&lt;/li&gt;&lt;li&gt;&lt;b&gt;MATCHING_ITEMS&lt;/b&gt; - This is meant to be used with one or more of the refinement values above. You use this to return the specified refinements and all the matching items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;FULL&lt;/b&gt; - This returns all the refinement containers and all the matching items.&lt;/li&gt;&lt;/ul&gt;Code so that your app gracefully handles any future changes to this list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; MATCHING_ITEMS (optional)
     * @param string $filter               An array of field filters that can be used to limit/customize the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also combine filters. &lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50],sellers:{rpseller|bigSal}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#004680\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt; Refer to &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html\&quot;&gt;Buy API Field Filters&lt;/a&gt; for details and examples of all supported filters.&lt;/span&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:FilterField (optional)
     * @param string $gtin                 This field lets you search by the Global Trade Item Number of the item as defined by &lt;a href&#x3D;\&quot;https://www.gtin.info \&quot; target&#x3D;\&quot;_blank\&quot;&gt;https://www.gtin.info&lt;/a&gt;. You can search only by UPC (Universal Product Code). If you have other formats of GTIN, you need to search by keyword.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt; /buy/browse/v1/item_summary/search?gtin&#x3D;099482432621&lt;/code&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt; Maximum: &lt;/b&gt; 1     &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt; (or any combination of these) (optional)
     * @param string $limit                The number of items from the result set returned in a single page. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; If a value is set in the &lt;b&gt;limit&lt;/b&gt; field, the value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the &lt;b&gt;limit&lt;/b&gt; value. An error is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 50 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items per page (limit):&lt;/b&gt; 200  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items in a result set:&lt;/b&gt; 10,000 (optional)
     * @param string $offset               Specifies the number of items to skip in the result set. This is used with the &lt;b&gt;limit&lt;/b&gt; field to control the pagination of the output. &lt;br /&gt;&lt;br /&gt;For example, if &lt;b&gt;offset&lt;/b&gt; is 0 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 1-10 from the list of items returned; if &lt;b&gt;offset&lt;/b&gt; is 10 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 11-20 from the list of items returned. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the value set in the &lt;b&gt;limit&lt;/b&gt; field. An empty result set is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Valid Values&lt;/b&gt;: 0-10,000 (inclusive) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 0 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items returned:&lt;/b&gt; 10,000 (optional)
     * @param string $q                    A string consisting of one or more keywords that are used to search for items on eBay. The keywords are handled as follows:&lt;ul&gt;&lt;li&gt;If the keywords are separated by a space, it is treated as an AND. In the following example, the query returns items that have iphone &lt;b&gt;AND&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;iphone ipad&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If the keywords are input using parentheses and separated by a comma, or if they are URL-encoded, it is treated as an OR. In the following examples, the query returns items that have iphone &lt;b&gt;OR&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;(iphone, ipad)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;%28iphone%2c%20ipad%29&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Restriction:&lt;/b&gt; The &lt;code&gt;*&lt;/code&gt; wildcard character is &lt;b&gt;not&lt;/b&gt; allowed in this field.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The method must have &lt;b&gt;category_ids&lt;/b&gt;, &lt;b&gt;epid&lt;/b&gt;, &lt;b&gt;gtin&lt;/b&gt;, or &lt;b&gt;q&lt;/b&gt; (or any combination of these). (optional)
     * @param string $sort                 The order and field name that is used to sort the items. &lt;br /&gt;&lt;br /&gt;You can sort items by price, distance, or listing date. To sort in descending order, insert a hyphen (&lt;code&gt;-&lt;/code&gt;) before the name of the sorting option. If no &lt;b&gt;sort&lt;/b&gt; parameter is submitted, the result set is sorted by &amp;quot;&lt;a href&#x3D;\&quot;https://pages.ebay.com/help/sell/searchstanding.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Best Match&lt;/a&gt;&amp;quot;.&lt;br /&gt;&lt;br /&gt;Here are some examples showing how to use the &lt;b&gt;sort&lt;/b&gt; query parameter:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;distance&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;distance&lt;/i&gt; in ascending order (shortest distance first). This sorting option is only applicable if the &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html#pickupCountry\&quot;&gt;pickup&lt;/a&gt; filters are used, and only ascending order is supported.&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;-price&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;price + shipping cost&lt;/i&gt; in descending order (highest price first). This sorting option (by &lt;i&gt;price&lt;/i&gt;) is only guaranteed to work correctly if the &lt;b&gt;X-EBAY-C-ENDUSERCTX&lt;/b&gt; request header is used, with the &lt;b&gt;contextualLocation&lt;/b&gt; parameter being used to set the delivery country and postal code. Here is an example of how this header would be used to do this (note the URL encoding):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;X-EBAY-C-ENDUSERCTX: contextualLocation&#x3D;country%3DUS%2Czip%3D19406&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;newlyListed&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;listing date&lt;/i&gt; (most recently listed/newest items first).&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;endingSoonest&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;date/time&lt;/i&gt; the listing ends (listings nearest to end date/time first).&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Default:&lt;/b&gt; Ascending For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:SortField (optional)
     *
     * @throws \TNT\Ebay\Buy\Browse\V1\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     *
     * @return \TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection
     */
    public function search($aspect_filter = null, $auto_correct = null, $category_ids = null, $charity_ids = null, $compatibility_filter = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
    {
        [$response] = $this->searchWithHttpInfo($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort);

        return $response;
    }

    /**
     * Operation searchWithHttpInfo.
     *
     * @param string $aspect_filter        This field lets you filter by item aspects. The aspect name/value pairs and category, which is required, is used to limit the results to specific aspects of the item. For example, in a clothing category one aspect pair would be Color/Red. &lt;br /&gt;&lt;br /&gt;For example, the method below uses the category ID for Women&#39;s Clothing. This will return only items for a woman&#39;s red shirt.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;category_ids&#x3D;15724&amp;aspect_filter&#x3D;categoryId:15724,Color:{Red}&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;To get a list of the aspect pairs and the category, which is returned in the &lt;b&gt;dominantCategoryId&lt;/b&gt; field, set &lt;b&gt;fieldgroups&lt;/b&gt; to &lt;code&gt;ASPECT_REFINEMENTS&lt;/code&gt;.   &lt;br /&gt;&lt;br /&gt; &lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;amp;fieldgroups&#x3D;ASPECT_REFINEMENTS&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note:&lt;/b&gt; The pipe symbol is used as a delimiter between aspect filter values. If a value contains a pipe symbol (for example, the brand name &#39;Bed|Stü&#39;), you must enter a backslash before the pipe character to prevent it from being evaluated as a delimiter. &lt;br /&gt;&lt;br /&gt;The following example shows the correct format for entering two brand names as aspect filter values, one of which contains a pipe symbol:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?limit&#x3D;50&amp;category_ids&#x3D;3034&amp;filter&#x3D;buyingOptions:{AUCTION|FIXED_PRICE}&amp;aspect_filter&#x3D;categoryId:3034,Brand:{Bed&amp;bsol;|Stü|Nike}&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The category ID is required &lt;i&gt;twice&lt;/i&gt;; once as a URI parameter and as part of the &lt;b&gt; aspect_filter&lt;/b&gt;. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:AspectFilter (optional)
     * @param string $auto_correct         A query parameter that enables auto correction.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;code&gt;KEYWORD&lt;/code&gt; (optional)
     * @param string $category_ids         &lt;a name&#x3D;\&quot;category_ids\&quot;&gt;&lt;/a&gt;The category ID is used to limit the results. This field can have one category ID or a comma separated list of IDs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?category_ids&#x3D;29792&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note: &lt;/b&gt;Currently, you can pass in only one category ID per request.&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;You can also use any combination of the &lt;b&gt; category_Ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, and &lt;b&gt; q&lt;/b&gt; fields. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;For example, let&#39;s say you are looking of a toy phone. If you search for \&quot;phone\&quot;, the result set will be mobile phones because this is the \&quot;Best Match\&quot; for this search. But if you also include the toy category ID, the results will be what you wanted. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;phone&amp;category_ids&#x3D;220&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;The list of eBay category IDs is not published and category IDs are not the same across all the eBay marketplaces. You can use the following techniques to find a category by site: &lt;ul&gt; &lt;li&gt;Use the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellerinformation/news/categorychanges.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Category Changes page&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;Use the Taxonomy API. For details see &lt;a href&#x3D;\&quot;/api-docs/buy/buy-categories.html\&quot;&gt;Get Categories for Buy APIs&lt;/a&gt;. &lt;/li&gt;  &lt;li&gt;Submit the following method to get the &lt;b&gt; dominantCategoryId&lt;/b&gt; for an item. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;&lt;em&gt; keyword&lt;/em&gt;&amp;fieldgroups&#x3D;ASPECT_REFINEMENTS  &lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt; Note:&lt;/b&gt; If a top-level (L1) category is specified, you &lt;b&gt; must&lt;/b&gt; also include the &lt;b&gt; q&lt;/b&gt; query parameter.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $charity_ids          The charity ID is used to limit the results to only items associated with the specified charity. This field can have one charity ID or a comma separated list of IDs. The method will return all the items associated with the specified charities.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;For example:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?charity_ids&#x3D;13-1788491,300108469&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The charity ID is the charity&#39;s registration ID, also known as the Employer Identification Number (EIN). In GB, it is the Charity Registration Number (CRN), commonly called \&quot;Charity Number\&quot;.   &lt;ul&gt;&lt;li&gt;To find the charities eBay supports, you can search for a charity at &lt;a href&#x3D;\&quot;https://charity.ebay.com/search \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Search &lt;/a&gt; or go to &lt;a href&#x3D;\&quot;https://www.ebay.com/b/Charity/bn_7114598164 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Shop&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;To find the charity ID of a specific charity, click on a charity and use the EIN number. For example, the charity ID for  &lt;a href&#x3D;\&quot;https://charity.ebay.com/charity/American-Red-Cross/3843 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;American Red Cross&lt;/a&gt;, is &lt;code&gt;530196605&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt; You  can also use any combination of the &lt;code&gt;category_Ids&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; fields with a &lt;code&gt;charity_Ids&lt;/code&gt; to filter the result set. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restriction: &lt;/b&gt; This is supported only on the US and GB marketplaces.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum: &lt;/b&gt; 20 IDs &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; One ID (optional)
     * @param string $compatibility_filter This field specifies the attributes used to define a specific product. The service searches for items matching the keyword or matching the keyword and a product attribute value in the title of the item.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The only products supported are cars, trucks, and motorcycles.&lt;/span&gt;&lt;br /&gt;For example, if the keyword is &lt;code&gt;brakes&lt;/code&gt; and &lt;code&gt;compatibility-filter&#x3D;Year:2018;Make:BMW&lt;/code&gt;, the items returned are items with brakes, 2018, or BMW in the title.&lt;br /&gt;&lt;br /&gt;The service uses the product attributes to determine whether the item is compatible. The service returns the attributes that are compatible and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.compatibilityMatch\&quot;&gt; CompatibilityMatchEnum&lt;/a&gt; value that indicates how well the item matches the attributes.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#478415\&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt;&lt;/span&gt; See the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#s0-1-21-6-7-7-6-ReturnItemsthatareCompatiblewiththeKeywordandVehicle-9\&quot;&gt;Samples&lt;/a&gt; section for a detailed example.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Best Practice:&lt;/b&gt; Submit all of the &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attributes&lt;/a&gt; for the specific product.&lt;br /&gt;&lt;br /&gt;To find the attributes and values for a specific marketplace, you can use the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/category_tree/methods/getCompatibilityProperties\&quot;&gt;getCompatibilityProperties&lt;/a&gt; method in the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/methods\&quot;&gt;Taxonomy API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For more details, see &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#Check\&quot;&gt;Check compatibility&lt;/a&gt; in the Buy Integration Guide.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Testing in Sandbox is only supported using mock data. See &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#sbox-test\&quot;&gt;Testing search in the Sandbox&lt;/a&gt; for details.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;q&lt;/b&gt; (keyword)&lt;/li&gt;&lt;li&gt;One fitment supported category ID (such as &lt;code&gt;33559&lt;/code&gt; Brakes)&lt;/li&gt;&lt;li&gt;At least one &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attribute&lt;/a&gt; name/value pair&lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:CompatibilityFilter (optional)
     * @param string $epid                 The ePID is the eBay product identifier of a product from the eBay product catalog. This field limits the results to only items in the specified ePID. &lt;br /&gt;&lt;br /&gt;The &lt;b&gt; Marketing&lt;/b&gt; API &lt;b&gt;getMerchandisedProducts&lt;/b&gt; method and the &lt;b&gt;Browse&lt;/b&gt; API &lt;b&gt; getItem&lt;/b&gt;, &lt;b&gt; getItemByLegacyId&lt;/b&gt;, and &lt;b&gt; getItemsByItemGroup&lt;/b&gt; calls return the ePID of the product.  You can also use the &lt;a href&#x3D;\&quot;/api-docs/commerce/catalog/resources/product_summary/methods/search\&quot;&gt;product_summary/search&lt;/a&gt; method in the &lt;b&gt;Catalog&lt;/b&gt; API to search for the ePID of the product. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?epid&#x3D;15032&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Maximum: &lt;/b&gt; 1    &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have  &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;,  &lt;b&gt; gtin&lt;/b&gt;,  or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $fieldgroups          This field is a comma separated list of values that lets you control what is returned in the response. The default is &lt;b&gt; MATCHING_ITEMS&lt;/b&gt;, which returns the items that match the keyword or category specified. The other values return data that can be used to create histograms or provide additional information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt; ASPECT_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.aspectDistributions\&quot;&gt;aspectDistributions&lt;/a&gt; container, which has the &lt;b&gt;dominantCategoryId&lt;/b&gt;, &lt;b&gt;matchCount&lt;/b&gt;, and &lt;b&gt;refinementHref&lt;/b&gt; for the various aspects of the items found. For example, if you searched for &#39;Mustang&#39;, some of the aspect would be &lt;b&gt;Model Year&lt;/b&gt;, &lt;b&gt;Exterior Color&lt;/b&gt;, &lt;b&gt;Vehicle Mileage&lt;/b&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt;Note:&lt;/b&gt; ASPECT_REFINEMENTS are category specific.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;BUYING_OPTION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.buyingOptionDistributions\&quot;&gt;buyingOptionDistributions&lt;/a&gt;  container, which has the &lt;b&gt;matchCount&lt;/b&gt; and &lt;b&gt;refinementHref&lt;/b&gt; for &lt;b&gt;AUCTION&lt;/b&gt;, &lt;b&gt;FIXED_PRICE&lt;/b&gt; (Buy It Now), and &lt;b&gt;CLASSIFIED_AD&lt;/b&gt; items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CATEGORY_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.categoryDistributions\&quot;&gt;categoryDistributions&lt;/a&gt; container, which has the categories that the item is in.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CONDITION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.conditionDistributions\&quot;&gt;conditionDistributions&lt;/a&gt;  container, such as &lt;b&gt;NEW&lt;/b&gt;, &lt;b&gt;USED&lt;/b&gt;, etc. Within these groups are multiple states of the condition. For example, &lt;b&gt;New&lt;/b&gt; can be New without tag, New in box, New without box, etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;EXTENDED&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.shortDescription\&quot;&gt;shortDescription&lt;/a&gt; field, which provides condition and item aspect information and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.itemLocation.city\&quot;&gt;itemLocation.city&lt;/a&gt; field.&lt;/li&gt;&lt;li&gt;&lt;b&gt;MATCHING_ITEMS&lt;/b&gt; - This is meant to be used with one or more of the refinement values above. You use this to return the specified refinements and all the matching items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;FULL&lt;/b&gt; - This returns all the refinement containers and all the matching items.&lt;/li&gt;&lt;/ul&gt;Code so that your app gracefully handles any future changes to this list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; MATCHING_ITEMS (optional)
     * @param string $filter               An array of field filters that can be used to limit/customize the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also combine filters. &lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50],sellers:{rpseller|bigSal}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#004680\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt; Refer to &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html\&quot;&gt;Buy API Field Filters&lt;/a&gt; for details and examples of all supported filters.&lt;/span&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:FilterField (optional)
     * @param string $gtin                 This field lets you search by the Global Trade Item Number of the item as defined by &lt;a href&#x3D;\&quot;https://www.gtin.info \&quot; target&#x3D;\&quot;_blank\&quot;&gt;https://www.gtin.info&lt;/a&gt;. You can search only by UPC (Universal Product Code). If you have other formats of GTIN, you need to search by keyword.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt; /buy/browse/v1/item_summary/search?gtin&#x3D;099482432621&lt;/code&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt; Maximum: &lt;/b&gt; 1     &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt; (or any combination of these) (optional)
     * @param string $limit                The number of items from the result set returned in a single page. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; If a value is set in the &lt;b&gt;limit&lt;/b&gt; field, the value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the &lt;b&gt;limit&lt;/b&gt; value. An error is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 50 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items per page (limit):&lt;/b&gt; 200  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items in a result set:&lt;/b&gt; 10,000 (optional)
     * @param string $offset               Specifies the number of items to skip in the result set. This is used with the &lt;b&gt;limit&lt;/b&gt; field to control the pagination of the output. &lt;br /&gt;&lt;br /&gt;For example, if &lt;b&gt;offset&lt;/b&gt; is 0 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 1-10 from the list of items returned; if &lt;b&gt;offset&lt;/b&gt; is 10 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 11-20 from the list of items returned. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the value set in the &lt;b&gt;limit&lt;/b&gt; field. An empty result set is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Valid Values&lt;/b&gt;: 0-10,000 (inclusive) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 0 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items returned:&lt;/b&gt; 10,000 (optional)
     * @param string $q                    A string consisting of one or more keywords that are used to search for items on eBay. The keywords are handled as follows:&lt;ul&gt;&lt;li&gt;If the keywords are separated by a space, it is treated as an AND. In the following example, the query returns items that have iphone &lt;b&gt;AND&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;iphone ipad&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If the keywords are input using parentheses and separated by a comma, or if they are URL-encoded, it is treated as an OR. In the following examples, the query returns items that have iphone &lt;b&gt;OR&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;(iphone, ipad)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;%28iphone%2c%20ipad%29&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Restriction:&lt;/b&gt; The &lt;code&gt;*&lt;/code&gt; wildcard character is &lt;b&gt;not&lt;/b&gt; allowed in this field.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The method must have &lt;b&gt;category_ids&lt;/b&gt;, &lt;b&gt;epid&lt;/b&gt;, &lt;b&gt;gtin&lt;/b&gt;, or &lt;b&gt;q&lt;/b&gt; (or any combination of these). (optional)
     * @param string $sort                 The order and field name that is used to sort the items. &lt;br /&gt;&lt;br /&gt;You can sort items by price, distance, or listing date. To sort in descending order, insert a hyphen (&lt;code&gt;-&lt;/code&gt;) before the name of the sorting option. If no &lt;b&gt;sort&lt;/b&gt; parameter is submitted, the result set is sorted by &amp;quot;&lt;a href&#x3D;\&quot;https://pages.ebay.com/help/sell/searchstanding.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Best Match&lt;/a&gt;&amp;quot;.&lt;br /&gt;&lt;br /&gt;Here are some examples showing how to use the &lt;b&gt;sort&lt;/b&gt; query parameter:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;distance&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;distance&lt;/i&gt; in ascending order (shortest distance first). This sorting option is only applicable if the &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html#pickupCountry\&quot;&gt;pickup&lt;/a&gt; filters are used, and only ascending order is supported.&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;-price&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;price + shipping cost&lt;/i&gt; in descending order (highest price first). This sorting option (by &lt;i&gt;price&lt;/i&gt;) is only guaranteed to work correctly if the &lt;b&gt;X-EBAY-C-ENDUSERCTX&lt;/b&gt; request header is used, with the &lt;b&gt;contextualLocation&lt;/b&gt; parameter being used to set the delivery country and postal code. Here is an example of how this header would be used to do this (note the URL encoding):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;X-EBAY-C-ENDUSERCTX: contextualLocation&#x3D;country%3DUS%2Czip%3D19406&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;newlyListed&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;listing date&lt;/i&gt; (most recently listed/newest items first).&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;endingSoonest&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;date/time&lt;/i&gt; the listing ends (listings nearest to end date/time first).&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Default:&lt;/b&gt; Ascending For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:SortField (optional)
     *
     * @throws \TNT\Ebay\Buy\Browse\V1\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     *
     * @return array of \TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection, HTTP status code, HTTP response headers (array of strings)
     */
    public function searchWithHttpInfo($aspect_filter = null, $auto_correct = null, $category_ids = null, $charity_ids = null, $compatibility_filter = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
    {
        $request = $this->searchRequest($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort);

        try {
            $options = $this->createHttpClientOption();

            try {
                $response = $this->client->send($request, $options);
            } catch (RequestException $e) {
                throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null, $e);
            } catch (ConnectException $e) {
                throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), null, null, $e);
            } catch (GuzzleException $e) {
                throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), null, null, $e);
            }

            $statusCode = $response->getStatusCode();

            if ($statusCode < 200 || $statusCode > 299) {
                throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody());
            }

            switch ($statusCode) {
                case 200:
                    if ('\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection' === '\SplFileObject') {
                        $content = $response->getBody(); // Stream goes to serializer.
                    } else {
                        $content = (string) $response->getBody();
                    }

                    return [
                        ObjectSerializer::deserialize($content, '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection', []),
                        $response->getStatusCode(),
                        $response->getHeaders(),
                    ];
            }

            $returnType = '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection';

            if ($returnType === '\SplFileObject') {
                $content = $response->getBody(); // Stream goes to serializer.
            } else {
                $content = (string) $response->getBody();
            }

            return [
                ObjectSerializer::deserialize($content, $returnType, []),
                $response->getStatusCode(),
                $response->getHeaders(),
            ];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = ObjectSerializer::deserialize(
                        $e->getResponseBody(),
                        '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection',
                        $e->getResponseHeaders()
                    );
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation searchAsync.
     *
     * @param string $aspect_filter        This field lets you filter by item aspects. The aspect name/value pairs and category, which is required, is used to limit the results to specific aspects of the item. For example, in a clothing category one aspect pair would be Color/Red. &lt;br /&gt;&lt;br /&gt;For example, the method below uses the category ID for Women&#39;s Clothing. This will return only items for a woman&#39;s red shirt.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;category_ids&#x3D;15724&amp;aspect_filter&#x3D;categoryId:15724,Color:{Red}&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;To get a list of the aspect pairs and the category, which is returned in the &lt;b&gt;dominantCategoryId&lt;/b&gt; field, set &lt;b&gt;fieldgroups&lt;/b&gt; to &lt;code&gt;ASPECT_REFINEMENTS&lt;/code&gt;.   &lt;br /&gt;&lt;br /&gt; &lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;amp;fieldgroups&#x3D;ASPECT_REFINEMENTS&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note:&lt;/b&gt; The pipe symbol is used as a delimiter between aspect filter values. If a value contains a pipe symbol (for example, the brand name &#39;Bed|Stü&#39;), you must enter a backslash before the pipe character to prevent it from being evaluated as a delimiter. &lt;br /&gt;&lt;br /&gt;The following example shows the correct format for entering two brand names as aspect filter values, one of which contains a pipe symbol:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?limit&#x3D;50&amp;category_ids&#x3D;3034&amp;filter&#x3D;buyingOptions:{AUCTION|FIXED_PRICE}&amp;aspect_filter&#x3D;categoryId:3034,Brand:{Bed&amp;bsol;|Stü|Nike}&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The category ID is required &lt;i&gt;twice&lt;/i&gt;; once as a URI parameter and as part of the &lt;b&gt; aspect_filter&lt;/b&gt;. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:AspectFilter (optional)
     * @param string $auto_correct         A query parameter that enables auto correction.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;code&gt;KEYWORD&lt;/code&gt; (optional)
     * @param string $category_ids         &lt;a name&#x3D;\&quot;category_ids\&quot;&gt;&lt;/a&gt;The category ID is used to limit the results. This field can have one category ID or a comma separated list of IDs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?category_ids&#x3D;29792&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note: &lt;/b&gt;Currently, you can pass in only one category ID per request.&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;You can also use any combination of the &lt;b&gt; category_Ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, and &lt;b&gt; q&lt;/b&gt; fields. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;For example, let&#39;s say you are looking of a toy phone. If you search for \&quot;phone\&quot;, the result set will be mobile phones because this is the \&quot;Best Match\&quot; for this search. But if you also include the toy category ID, the results will be what you wanted. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;phone&amp;category_ids&#x3D;220&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;The list of eBay category IDs is not published and category IDs are not the same across all the eBay marketplaces. You can use the following techniques to find a category by site: &lt;ul&gt; &lt;li&gt;Use the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellerinformation/news/categorychanges.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Category Changes page&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;Use the Taxonomy API. For details see &lt;a href&#x3D;\&quot;/api-docs/buy/buy-categories.html\&quot;&gt;Get Categories for Buy APIs&lt;/a&gt;. &lt;/li&gt;  &lt;li&gt;Submit the following method to get the &lt;b&gt; dominantCategoryId&lt;/b&gt; for an item. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;&lt;em&gt; keyword&lt;/em&gt;&amp;fieldgroups&#x3D;ASPECT_REFINEMENTS  &lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt; Note:&lt;/b&gt; If a top-level (L1) category is specified, you &lt;b&gt; must&lt;/b&gt; also include the &lt;b&gt; q&lt;/b&gt; query parameter.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $charity_ids          The charity ID is used to limit the results to only items associated with the specified charity. This field can have one charity ID or a comma separated list of IDs. The method will return all the items associated with the specified charities.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;For example:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?charity_ids&#x3D;13-1788491,300108469&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The charity ID is the charity&#39;s registration ID, also known as the Employer Identification Number (EIN). In GB, it is the Charity Registration Number (CRN), commonly called \&quot;Charity Number\&quot;.   &lt;ul&gt;&lt;li&gt;To find the charities eBay supports, you can search for a charity at &lt;a href&#x3D;\&quot;https://charity.ebay.com/search \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Search &lt;/a&gt; or go to &lt;a href&#x3D;\&quot;https://www.ebay.com/b/Charity/bn_7114598164 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Shop&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;To find the charity ID of a specific charity, click on a charity and use the EIN number. For example, the charity ID for  &lt;a href&#x3D;\&quot;https://charity.ebay.com/charity/American-Red-Cross/3843 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;American Red Cross&lt;/a&gt;, is &lt;code&gt;530196605&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt; You  can also use any combination of the &lt;code&gt;category_Ids&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; fields with a &lt;code&gt;charity_Ids&lt;/code&gt; to filter the result set. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restriction: &lt;/b&gt; This is supported only on the US and GB marketplaces.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum: &lt;/b&gt; 20 IDs &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; One ID (optional)
     * @param string $compatibility_filter This field specifies the attributes used to define a specific product. The service searches for items matching the keyword or matching the keyword and a product attribute value in the title of the item.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The only products supported are cars, trucks, and motorcycles.&lt;/span&gt;&lt;br /&gt;For example, if the keyword is &lt;code&gt;brakes&lt;/code&gt; and &lt;code&gt;compatibility-filter&#x3D;Year:2018;Make:BMW&lt;/code&gt;, the items returned are items with brakes, 2018, or BMW in the title.&lt;br /&gt;&lt;br /&gt;The service uses the product attributes to determine whether the item is compatible. The service returns the attributes that are compatible and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.compatibilityMatch\&quot;&gt; CompatibilityMatchEnum&lt;/a&gt; value that indicates how well the item matches the attributes.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#478415\&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt;&lt;/span&gt; See the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#s0-1-21-6-7-7-6-ReturnItemsthatareCompatiblewiththeKeywordandVehicle-9\&quot;&gt;Samples&lt;/a&gt; section for a detailed example.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Best Practice:&lt;/b&gt; Submit all of the &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attributes&lt;/a&gt; for the specific product.&lt;br /&gt;&lt;br /&gt;To find the attributes and values for a specific marketplace, you can use the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/category_tree/methods/getCompatibilityProperties\&quot;&gt;getCompatibilityProperties&lt;/a&gt; method in the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/methods\&quot;&gt;Taxonomy API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For more details, see &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#Check\&quot;&gt;Check compatibility&lt;/a&gt; in the Buy Integration Guide.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Testing in Sandbox is only supported using mock data. See &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#sbox-test\&quot;&gt;Testing search in the Sandbox&lt;/a&gt; for details.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;q&lt;/b&gt; (keyword)&lt;/li&gt;&lt;li&gt;One fitment supported category ID (such as &lt;code&gt;33559&lt;/code&gt; Brakes)&lt;/li&gt;&lt;li&gt;At least one &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attribute&lt;/a&gt; name/value pair&lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:CompatibilityFilter (optional)
     * @param string $epid                 The ePID is the eBay product identifier of a product from the eBay product catalog. This field limits the results to only items in the specified ePID. &lt;br /&gt;&lt;br /&gt;The &lt;b&gt; Marketing&lt;/b&gt; API &lt;b&gt;getMerchandisedProducts&lt;/b&gt; method and the &lt;b&gt;Browse&lt;/b&gt; API &lt;b&gt; getItem&lt;/b&gt;, &lt;b&gt; getItemByLegacyId&lt;/b&gt;, and &lt;b&gt; getItemsByItemGroup&lt;/b&gt; calls return the ePID of the product.  You can also use the &lt;a href&#x3D;\&quot;/api-docs/commerce/catalog/resources/product_summary/methods/search\&quot;&gt;product_summary/search&lt;/a&gt; method in the &lt;b&gt;Catalog&lt;/b&gt; API to search for the ePID of the product. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?epid&#x3D;15032&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Maximum: &lt;/b&gt; 1    &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have  &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;,  &lt;b&gt; gtin&lt;/b&gt;,  or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $fieldgroups          This field is a comma separated list of values that lets you control what is returned in the response. The default is &lt;b&gt; MATCHING_ITEMS&lt;/b&gt;, which returns the items that match the keyword or category specified. The other values return data that can be used to create histograms or provide additional information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt; ASPECT_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.aspectDistributions\&quot;&gt;aspectDistributions&lt;/a&gt; container, which has the &lt;b&gt;dominantCategoryId&lt;/b&gt;, &lt;b&gt;matchCount&lt;/b&gt;, and &lt;b&gt;refinementHref&lt;/b&gt; for the various aspects of the items found. For example, if you searched for &#39;Mustang&#39;, some of the aspect would be &lt;b&gt;Model Year&lt;/b&gt;, &lt;b&gt;Exterior Color&lt;/b&gt;, &lt;b&gt;Vehicle Mileage&lt;/b&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt;Note:&lt;/b&gt; ASPECT_REFINEMENTS are category specific.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;BUYING_OPTION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.buyingOptionDistributions\&quot;&gt;buyingOptionDistributions&lt;/a&gt;  container, which has the &lt;b&gt;matchCount&lt;/b&gt; and &lt;b&gt;refinementHref&lt;/b&gt; for &lt;b&gt;AUCTION&lt;/b&gt;, &lt;b&gt;FIXED_PRICE&lt;/b&gt; (Buy It Now), and &lt;b&gt;CLASSIFIED_AD&lt;/b&gt; items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CATEGORY_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.categoryDistributions\&quot;&gt;categoryDistributions&lt;/a&gt; container, which has the categories that the item is in.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CONDITION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.conditionDistributions\&quot;&gt;conditionDistributions&lt;/a&gt;  container, such as &lt;b&gt;NEW&lt;/b&gt;, &lt;b&gt;USED&lt;/b&gt;, etc. Within these groups are multiple states of the condition. For example, &lt;b&gt;New&lt;/b&gt; can be New without tag, New in box, New without box, etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;EXTENDED&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.shortDescription\&quot;&gt;shortDescription&lt;/a&gt; field, which provides condition and item aspect information and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.itemLocation.city\&quot;&gt;itemLocation.city&lt;/a&gt; field.&lt;/li&gt;&lt;li&gt;&lt;b&gt;MATCHING_ITEMS&lt;/b&gt; - This is meant to be used with one or more of the refinement values above. You use this to return the specified refinements and all the matching items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;FULL&lt;/b&gt; - This returns all the refinement containers and all the matching items.&lt;/li&gt;&lt;/ul&gt;Code so that your app gracefully handles any future changes to this list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; MATCHING_ITEMS (optional)
     * @param string $filter               An array of field filters that can be used to limit/customize the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also combine filters. &lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50],sellers:{rpseller|bigSal}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#004680\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt; Refer to &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html\&quot;&gt;Buy API Field Filters&lt;/a&gt; for details and examples of all supported filters.&lt;/span&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:FilterField (optional)
     * @param string $gtin                 This field lets you search by the Global Trade Item Number of the item as defined by &lt;a href&#x3D;\&quot;https://www.gtin.info \&quot; target&#x3D;\&quot;_blank\&quot;&gt;https://www.gtin.info&lt;/a&gt;. You can search only by UPC (Universal Product Code). If you have other formats of GTIN, you need to search by keyword.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt; /buy/browse/v1/item_summary/search?gtin&#x3D;099482432621&lt;/code&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt; Maximum: &lt;/b&gt; 1     &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt; (or any combination of these) (optional)
     * @param string $limit                The number of items from the result set returned in a single page. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; If a value is set in the &lt;b&gt;limit&lt;/b&gt; field, the value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the &lt;b&gt;limit&lt;/b&gt; value. An error is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 50 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items per page (limit):&lt;/b&gt; 200  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items in a result set:&lt;/b&gt; 10,000 (optional)
     * @param string $offset               Specifies the number of items to skip in the result set. This is used with the &lt;b&gt;limit&lt;/b&gt; field to control the pagination of the output. &lt;br /&gt;&lt;br /&gt;For example, if &lt;b&gt;offset&lt;/b&gt; is 0 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 1-10 from the list of items returned; if &lt;b&gt;offset&lt;/b&gt; is 10 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 11-20 from the list of items returned. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the value set in the &lt;b&gt;limit&lt;/b&gt; field. An empty result set is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Valid Values&lt;/b&gt;: 0-10,000 (inclusive) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 0 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items returned:&lt;/b&gt; 10,000 (optional)
     * @param string $q                    A string consisting of one or more keywords that are used to search for items on eBay. The keywords are handled as follows:&lt;ul&gt;&lt;li&gt;If the keywords are separated by a space, it is treated as an AND. In the following example, the query returns items that have iphone &lt;b&gt;AND&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;iphone ipad&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If the keywords are input using parentheses and separated by a comma, or if they are URL-encoded, it is treated as an OR. In the following examples, the query returns items that have iphone &lt;b&gt;OR&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;(iphone, ipad)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;%28iphone%2c%20ipad%29&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Restriction:&lt;/b&gt; The &lt;code&gt;*&lt;/code&gt; wildcard character is &lt;b&gt;not&lt;/b&gt; allowed in this field.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The method must have &lt;b&gt;category_ids&lt;/b&gt;, &lt;b&gt;epid&lt;/b&gt;, &lt;b&gt;gtin&lt;/b&gt;, or &lt;b&gt;q&lt;/b&gt; (or any combination of these). (optional)
     * @param string $sort                 The order and field name that is used to sort the items. &lt;br /&gt;&lt;br /&gt;You can sort items by price, distance, or listing date. To sort in descending order, insert a hyphen (&lt;code&gt;-&lt;/code&gt;) before the name of the sorting option. If no &lt;b&gt;sort&lt;/b&gt; parameter is submitted, the result set is sorted by &amp;quot;&lt;a href&#x3D;\&quot;https://pages.ebay.com/help/sell/searchstanding.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Best Match&lt;/a&gt;&amp;quot;.&lt;br /&gt;&lt;br /&gt;Here are some examples showing how to use the &lt;b&gt;sort&lt;/b&gt; query parameter:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;distance&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;distance&lt;/i&gt; in ascending order (shortest distance first). This sorting option is only applicable if the &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html#pickupCountry\&quot;&gt;pickup&lt;/a&gt; filters are used, and only ascending order is supported.&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;-price&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;price + shipping cost&lt;/i&gt; in descending order (highest price first). This sorting option (by &lt;i&gt;price&lt;/i&gt;) is only guaranteed to work correctly if the &lt;b&gt;X-EBAY-C-ENDUSERCTX&lt;/b&gt; request header is used, with the &lt;b&gt;contextualLocation&lt;/b&gt; parameter being used to set the delivery country and postal code. Here is an example of how this header would be used to do this (note the URL encoding):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;X-EBAY-C-ENDUSERCTX: contextualLocation&#x3D;country%3DUS%2Czip%3D19406&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;newlyListed&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;listing date&lt;/i&gt; (most recently listed/newest items first).&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;endingSoonest&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;date/time&lt;/i&gt; the listing ends (listings nearest to end date/time first).&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Default:&lt;/b&gt; Ascending For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:SortField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function searchAsync($aspect_filter = null, $auto_correct = null, $category_ids = null, $charity_ids = null, $compatibility_filter = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
    {
        return $this->searchAsyncWithHttpInfo($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }

    /**
     * Operation searchAsyncWithHttpInfo.
     *
     * @param string $aspect_filter        This field lets you filter by item aspects. The aspect name/value pairs and category, which is required, is used to limit the results to specific aspects of the item. For example, in a clothing category one aspect pair would be Color/Red. &lt;br /&gt;&lt;br /&gt;For example, the method below uses the category ID for Women&#39;s Clothing. This will return only items for a woman&#39;s red shirt.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;category_ids&#x3D;15724&amp;aspect_filter&#x3D;categoryId:15724,Color:{Red}&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;To get a list of the aspect pairs and the category, which is returned in the &lt;b&gt;dominantCategoryId&lt;/b&gt; field, set &lt;b&gt;fieldgroups&lt;/b&gt; to &lt;code&gt;ASPECT_REFINEMENTS&lt;/code&gt;.   &lt;br /&gt;&lt;br /&gt; &lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;amp;fieldgroups&#x3D;ASPECT_REFINEMENTS&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note:&lt;/b&gt; The pipe symbol is used as a delimiter between aspect filter values. If a value contains a pipe symbol (for example, the brand name &#39;Bed|Stü&#39;), you must enter a backslash before the pipe character to prevent it from being evaluated as a delimiter. &lt;br /&gt;&lt;br /&gt;The following example shows the correct format for entering two brand names as aspect filter values, one of which contains a pipe symbol:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?limit&#x3D;50&amp;category_ids&#x3D;3034&amp;filter&#x3D;buyingOptions:{AUCTION|FIXED_PRICE}&amp;aspect_filter&#x3D;categoryId:3034,Brand:{Bed&amp;bsol;|Stü|Nike}&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The category ID is required &lt;i&gt;twice&lt;/i&gt;; once as a URI parameter and as part of the &lt;b&gt; aspect_filter&lt;/b&gt;. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:AspectFilter (optional)
     * @param string $auto_correct         A query parameter that enables auto correction.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;code&gt;KEYWORD&lt;/code&gt; (optional)
     * @param string $category_ids         &lt;a name&#x3D;\&quot;category_ids\&quot;&gt;&lt;/a&gt;The category ID is used to limit the results. This field can have one category ID or a comma separated list of IDs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?category_ids&#x3D;29792&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note: &lt;/b&gt;Currently, you can pass in only one category ID per request.&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;You can also use any combination of the &lt;b&gt; category_Ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, and &lt;b&gt; q&lt;/b&gt; fields. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;For example, let&#39;s say you are looking of a toy phone. If you search for \&quot;phone\&quot;, the result set will be mobile phones because this is the \&quot;Best Match\&quot; for this search. But if you also include the toy category ID, the results will be what you wanted. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;phone&amp;category_ids&#x3D;220&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;The list of eBay category IDs is not published and category IDs are not the same across all the eBay marketplaces. You can use the following techniques to find a category by site: &lt;ul&gt; &lt;li&gt;Use the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellerinformation/news/categorychanges.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Category Changes page&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;Use the Taxonomy API. For details see &lt;a href&#x3D;\&quot;/api-docs/buy/buy-categories.html\&quot;&gt;Get Categories for Buy APIs&lt;/a&gt;. &lt;/li&gt;  &lt;li&gt;Submit the following method to get the &lt;b&gt; dominantCategoryId&lt;/b&gt; for an item. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;&lt;em&gt; keyword&lt;/em&gt;&amp;fieldgroups&#x3D;ASPECT_REFINEMENTS  &lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt; Note:&lt;/b&gt; If a top-level (L1) category is specified, you &lt;b&gt; must&lt;/b&gt; also include the &lt;b&gt; q&lt;/b&gt; query parameter.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $charity_ids          The charity ID is used to limit the results to only items associated with the specified charity. This field can have one charity ID or a comma separated list of IDs. The method will return all the items associated with the specified charities.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;For example:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?charity_ids&#x3D;13-1788491,300108469&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The charity ID is the charity&#39;s registration ID, also known as the Employer Identification Number (EIN). In GB, it is the Charity Registration Number (CRN), commonly called \&quot;Charity Number\&quot;.   &lt;ul&gt;&lt;li&gt;To find the charities eBay supports, you can search for a charity at &lt;a href&#x3D;\&quot;https://charity.ebay.com/search \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Search &lt;/a&gt; or go to &lt;a href&#x3D;\&quot;https://www.ebay.com/b/Charity/bn_7114598164 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Shop&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;To find the charity ID of a specific charity, click on a charity and use the EIN number. For example, the charity ID for  &lt;a href&#x3D;\&quot;https://charity.ebay.com/charity/American-Red-Cross/3843 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;American Red Cross&lt;/a&gt;, is &lt;code&gt;530196605&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt; You  can also use any combination of the &lt;code&gt;category_Ids&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; fields with a &lt;code&gt;charity_Ids&lt;/code&gt; to filter the result set. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restriction: &lt;/b&gt; This is supported only on the US and GB marketplaces.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum: &lt;/b&gt; 20 IDs &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; One ID (optional)
     * @param string $compatibility_filter This field specifies the attributes used to define a specific product. The service searches for items matching the keyword or matching the keyword and a product attribute value in the title of the item.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The only products supported are cars, trucks, and motorcycles.&lt;/span&gt;&lt;br /&gt;For example, if the keyword is &lt;code&gt;brakes&lt;/code&gt; and &lt;code&gt;compatibility-filter&#x3D;Year:2018;Make:BMW&lt;/code&gt;, the items returned are items with brakes, 2018, or BMW in the title.&lt;br /&gt;&lt;br /&gt;The service uses the product attributes to determine whether the item is compatible. The service returns the attributes that are compatible and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.compatibilityMatch\&quot;&gt; CompatibilityMatchEnum&lt;/a&gt; value that indicates how well the item matches the attributes.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#478415\&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt;&lt;/span&gt; See the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#s0-1-21-6-7-7-6-ReturnItemsthatareCompatiblewiththeKeywordandVehicle-9\&quot;&gt;Samples&lt;/a&gt; section for a detailed example.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Best Practice:&lt;/b&gt; Submit all of the &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attributes&lt;/a&gt; for the specific product.&lt;br /&gt;&lt;br /&gt;To find the attributes and values for a specific marketplace, you can use the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/category_tree/methods/getCompatibilityProperties\&quot;&gt;getCompatibilityProperties&lt;/a&gt; method in the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/methods\&quot;&gt;Taxonomy API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For more details, see &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#Check\&quot;&gt;Check compatibility&lt;/a&gt; in the Buy Integration Guide.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Testing in Sandbox is only supported using mock data. See &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#sbox-test\&quot;&gt;Testing search in the Sandbox&lt;/a&gt; for details.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;q&lt;/b&gt; (keyword)&lt;/li&gt;&lt;li&gt;One fitment supported category ID (such as &lt;code&gt;33559&lt;/code&gt; Brakes)&lt;/li&gt;&lt;li&gt;At least one &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attribute&lt;/a&gt; name/value pair&lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:CompatibilityFilter (optional)
     * @param string $epid                 The ePID is the eBay product identifier of a product from the eBay product catalog. This field limits the results to only items in the specified ePID. &lt;br /&gt;&lt;br /&gt;The &lt;b&gt; Marketing&lt;/b&gt; API &lt;b&gt;getMerchandisedProducts&lt;/b&gt; method and the &lt;b&gt;Browse&lt;/b&gt; API &lt;b&gt; getItem&lt;/b&gt;, &lt;b&gt; getItemByLegacyId&lt;/b&gt;, and &lt;b&gt; getItemsByItemGroup&lt;/b&gt; calls return the ePID of the product.  You can also use the &lt;a href&#x3D;\&quot;/api-docs/commerce/catalog/resources/product_summary/methods/search\&quot;&gt;product_summary/search&lt;/a&gt; method in the &lt;b&gt;Catalog&lt;/b&gt; API to search for the ePID of the product. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?epid&#x3D;15032&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Maximum: &lt;/b&gt; 1    &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have  &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;,  &lt;b&gt; gtin&lt;/b&gt;,  or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $fieldgroups          This field is a comma separated list of values that lets you control what is returned in the response. The default is &lt;b&gt; MATCHING_ITEMS&lt;/b&gt;, which returns the items that match the keyword or category specified. The other values return data that can be used to create histograms or provide additional information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt; ASPECT_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.aspectDistributions\&quot;&gt;aspectDistributions&lt;/a&gt; container, which has the &lt;b&gt;dominantCategoryId&lt;/b&gt;, &lt;b&gt;matchCount&lt;/b&gt;, and &lt;b&gt;refinementHref&lt;/b&gt; for the various aspects of the items found. For example, if you searched for &#39;Mustang&#39;, some of the aspect would be &lt;b&gt;Model Year&lt;/b&gt;, &lt;b&gt;Exterior Color&lt;/b&gt;, &lt;b&gt;Vehicle Mileage&lt;/b&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt;Note:&lt;/b&gt; ASPECT_REFINEMENTS are category specific.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;BUYING_OPTION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.buyingOptionDistributions\&quot;&gt;buyingOptionDistributions&lt;/a&gt;  container, which has the &lt;b&gt;matchCount&lt;/b&gt; and &lt;b&gt;refinementHref&lt;/b&gt; for &lt;b&gt;AUCTION&lt;/b&gt;, &lt;b&gt;FIXED_PRICE&lt;/b&gt; (Buy It Now), and &lt;b&gt;CLASSIFIED_AD&lt;/b&gt; items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CATEGORY_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.categoryDistributions\&quot;&gt;categoryDistributions&lt;/a&gt; container, which has the categories that the item is in.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CONDITION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.conditionDistributions\&quot;&gt;conditionDistributions&lt;/a&gt;  container, such as &lt;b&gt;NEW&lt;/b&gt;, &lt;b&gt;USED&lt;/b&gt;, etc. Within these groups are multiple states of the condition. For example, &lt;b&gt;New&lt;/b&gt; can be New without tag, New in box, New without box, etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;EXTENDED&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.shortDescription\&quot;&gt;shortDescription&lt;/a&gt; field, which provides condition and item aspect information and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.itemLocation.city\&quot;&gt;itemLocation.city&lt;/a&gt; field.&lt;/li&gt;&lt;li&gt;&lt;b&gt;MATCHING_ITEMS&lt;/b&gt; - This is meant to be used with one or more of the refinement values above. You use this to return the specified refinements and all the matching items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;FULL&lt;/b&gt; - This returns all the refinement containers and all the matching items.&lt;/li&gt;&lt;/ul&gt;Code so that your app gracefully handles any future changes to this list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; MATCHING_ITEMS (optional)
     * @param string $filter               An array of field filters that can be used to limit/customize the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also combine filters. &lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50],sellers:{rpseller|bigSal}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#004680\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt; Refer to &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html\&quot;&gt;Buy API Field Filters&lt;/a&gt; for details and examples of all supported filters.&lt;/span&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:FilterField (optional)
     * @param string $gtin                 This field lets you search by the Global Trade Item Number of the item as defined by &lt;a href&#x3D;\&quot;https://www.gtin.info \&quot; target&#x3D;\&quot;_blank\&quot;&gt;https://www.gtin.info&lt;/a&gt;. You can search only by UPC (Universal Product Code). If you have other formats of GTIN, you need to search by keyword.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt; /buy/browse/v1/item_summary/search?gtin&#x3D;099482432621&lt;/code&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt; Maximum: &lt;/b&gt; 1     &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt; (or any combination of these) (optional)
     * @param string $limit                The number of items from the result set returned in a single page. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; If a value is set in the &lt;b&gt;limit&lt;/b&gt; field, the value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the &lt;b&gt;limit&lt;/b&gt; value. An error is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 50 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items per page (limit):&lt;/b&gt; 200  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items in a result set:&lt;/b&gt; 10,000 (optional)
     * @param string $offset               Specifies the number of items to skip in the result set. This is used with the &lt;b&gt;limit&lt;/b&gt; field to control the pagination of the output. &lt;br /&gt;&lt;br /&gt;For example, if &lt;b&gt;offset&lt;/b&gt; is 0 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 1-10 from the list of items returned; if &lt;b&gt;offset&lt;/b&gt; is 10 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 11-20 from the list of items returned. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the value set in the &lt;b&gt;limit&lt;/b&gt; field. An empty result set is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Valid Values&lt;/b&gt;: 0-10,000 (inclusive) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 0 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items returned:&lt;/b&gt; 10,000 (optional)
     * @param string $q                    A string consisting of one or more keywords that are used to search for items on eBay. The keywords are handled as follows:&lt;ul&gt;&lt;li&gt;If the keywords are separated by a space, it is treated as an AND. In the following example, the query returns items that have iphone &lt;b&gt;AND&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;iphone ipad&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If the keywords are input using parentheses and separated by a comma, or if they are URL-encoded, it is treated as an OR. In the following examples, the query returns items that have iphone &lt;b&gt;OR&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;(iphone, ipad)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;%28iphone%2c%20ipad%29&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Restriction:&lt;/b&gt; The &lt;code&gt;*&lt;/code&gt; wildcard character is &lt;b&gt;not&lt;/b&gt; allowed in this field.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The method must have &lt;b&gt;category_ids&lt;/b&gt;, &lt;b&gt;epid&lt;/b&gt;, &lt;b&gt;gtin&lt;/b&gt;, or &lt;b&gt;q&lt;/b&gt; (or any combination of these). (optional)
     * @param string $sort                 The order and field name that is used to sort the items. &lt;br /&gt;&lt;br /&gt;You can sort items by price, distance, or listing date. To sort in descending order, insert a hyphen (&lt;code&gt;-&lt;/code&gt;) before the name of the sorting option. If no &lt;b&gt;sort&lt;/b&gt; parameter is submitted, the result set is sorted by &amp;quot;&lt;a href&#x3D;\&quot;https://pages.ebay.com/help/sell/searchstanding.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Best Match&lt;/a&gt;&amp;quot;.&lt;br /&gt;&lt;br /&gt;Here are some examples showing how to use the &lt;b&gt;sort&lt;/b&gt; query parameter:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;distance&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;distance&lt;/i&gt; in ascending order (shortest distance first). This sorting option is only applicable if the &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html#pickupCountry\&quot;&gt;pickup&lt;/a&gt; filters are used, and only ascending order is supported.&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;-price&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;price + shipping cost&lt;/i&gt; in descending order (highest price first). This sorting option (by &lt;i&gt;price&lt;/i&gt;) is only guaranteed to work correctly if the &lt;b&gt;X-EBAY-C-ENDUSERCTX&lt;/b&gt; request header is used, with the &lt;b&gt;contextualLocation&lt;/b&gt; parameter being used to set the delivery country and postal code. Here is an example of how this header would be used to do this (note the URL encoding):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;X-EBAY-C-ENDUSERCTX: contextualLocation&#x3D;country%3DUS%2Czip%3D19406&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;newlyListed&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;listing date&lt;/i&gt; (most recently listed/newest items first).&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;endingSoonest&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;date/time&lt;/i&gt; the listing ends (listings nearest to end date/time first).&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Default:&lt;/b&gt; Ascending For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:SortField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function searchAsyncWithHttpInfo($aspect_filter = null, $auto_correct = null, $category_ids = null, $charity_ids = null, $compatibility_filter = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
    {
        $returnType = '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection';
        $request = $this->searchRequest($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort);

        return $this->client
            ->sendAsync($request, $this->createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    if ($returnType === '\SplFileObject') {
                        $content = $response->getBody(); // Stream goes to serializer.
                    } else {
                        $content = (string) $response->getBody();
                    }

                    return [
                        ObjectSerializer::deserialize($content, $returnType, []),
                        $response->getStatusCode(),
                        $response->getHeaders(),
                    ];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();

                    throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody(), $exception instanceof \Throwable ? $exception : null);
                }
            );
    }

    /**
     * Create request for operation 'search'.
     *
     * @param string $aspect_filter        This field lets you filter by item aspects. The aspect name/value pairs and category, which is required, is used to limit the results to specific aspects of the item. For example, in a clothing category one aspect pair would be Color/Red. &lt;br /&gt;&lt;br /&gt;For example, the method below uses the category ID for Women&#39;s Clothing. This will return only items for a woman&#39;s red shirt.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;category_ids&#x3D;15724&amp;aspect_filter&#x3D;categoryId:15724,Color:{Red}&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;To get a list of the aspect pairs and the category, which is returned in the &lt;b&gt;dominantCategoryId&lt;/b&gt; field, set &lt;b&gt;fieldgroups&lt;/b&gt; to &lt;code&gt;ASPECT_REFINEMENTS&lt;/code&gt;.   &lt;br /&gt;&lt;br /&gt; &lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;amp;fieldgroups&#x3D;ASPECT_REFINEMENTS&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note:&lt;/b&gt; The pipe symbol is used as a delimiter between aspect filter values. If a value contains a pipe symbol (for example, the brand name &#39;Bed|Stü&#39;), you must enter a backslash before the pipe character to prevent it from being evaluated as a delimiter. &lt;br /&gt;&lt;br /&gt;The following example shows the correct format for entering two brand names as aspect filter values, one of which contains a pipe symbol:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?limit&#x3D;50&amp;category_ids&#x3D;3034&amp;filter&#x3D;buyingOptions:{AUCTION|FIXED_PRICE}&amp;aspect_filter&#x3D;categoryId:3034,Brand:{Bed&amp;bsol;|Stü|Nike}&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The category ID is required &lt;i&gt;twice&lt;/i&gt;; once as a URI parameter and as part of the &lt;b&gt; aspect_filter&lt;/b&gt;. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:AspectFilter (optional)
     * @param string $auto_correct         A query parameter that enables auto correction.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;code&gt;KEYWORD&lt;/code&gt; (optional)
     * @param string $category_ids         &lt;a name&#x3D;\&quot;category_ids\&quot;&gt;&lt;/a&gt;The category ID is used to limit the results. This field can have one category ID or a comma separated list of IDs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?category_ids&#x3D;29792&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt; Note: &lt;/b&gt;Currently, you can pass in only one category ID per request.&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;You can also use any combination of the &lt;b&gt; category_Ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, and &lt;b&gt; q&lt;/b&gt; fields. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;For example, let&#39;s say you are looking of a toy phone. If you search for \&quot;phone\&quot;, the result set will be mobile phones because this is the \&quot;Best Match\&quot; for this search. But if you also include the toy category ID, the results will be what you wanted. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;phone&amp;category_ids&#x3D;220&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;The list of eBay category IDs is not published and category IDs are not the same across all the eBay marketplaces. You can use the following techniques to find a category by site: &lt;ul&gt; &lt;li&gt;Use the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellerinformation/news/categorychanges.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Category Changes page&lt;/a&gt;.&lt;/li&gt; &lt;li&gt;Use the Taxonomy API. For details see &lt;a href&#x3D;\&quot;/api-docs/buy/buy-categories.html\&quot;&gt;Get Categories for Buy APIs&lt;/a&gt;. &lt;/li&gt;  &lt;li&gt;Submit the following method to get the &lt;b&gt; dominantCategoryId&lt;/b&gt; for an item. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;&lt;em&gt; keyword&lt;/em&gt;&amp;fieldgroups&#x3D;ASPECT_REFINEMENTS  &lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt; Note:&lt;/b&gt; If a top-level (L1) category is specified, you &lt;b&gt; must&lt;/b&gt; also include the &lt;b&gt; q&lt;/b&gt; query parameter.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $charity_ids          The charity ID is used to limit the results to only items associated with the specified charity. This field can have one charity ID or a comma separated list of IDs. The method will return all the items associated with the specified charities.&lt;br /&gt;&lt;br /&gt; &lt;b&gt;For example:&lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?charity_ids&#x3D;13-1788491,300108469&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The charity ID is the charity&#39;s registration ID, also known as the Employer Identification Number (EIN). In GB, it is the Charity Registration Number (CRN), commonly called \&quot;Charity Number\&quot;.   &lt;ul&gt;&lt;li&gt;To find the charities eBay supports, you can search for a charity at &lt;a href&#x3D;\&quot;https://charity.ebay.com/search \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Search &lt;/a&gt; or go to &lt;a href&#x3D;\&quot;https://www.ebay.com/b/Charity/bn_7114598164 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Charity Shop&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;To find the charity ID of a specific charity, click on a charity and use the EIN number. For example, the charity ID for  &lt;a href&#x3D;\&quot;https://charity.ebay.com/charity/American-Red-Cross/3843 \&quot; target&#x3D;\&quot;_blank\&quot;&gt;American Red Cross&lt;/a&gt;, is &lt;code&gt;530196605&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt; You  can also use any combination of the &lt;code&gt;category_Ids&lt;/code&gt; and &lt;code&gt;q&lt;/code&gt; fields with a &lt;code&gt;charity_Ids&lt;/code&gt; to filter the result set. This gives you additional control over the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Restriction: &lt;/b&gt; This is supported only on the US and GB marketplaces.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum: &lt;/b&gt; 20 IDs &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; One ID (optional)
     * @param string $compatibility_filter This field specifies the attributes used to define a specific product. The service searches for items matching the keyword or matching the keyword and a product attribute value in the title of the item.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The only products supported are cars, trucks, and motorcycles.&lt;/span&gt;&lt;br /&gt;For example, if the keyword is &lt;code&gt;brakes&lt;/code&gt; and &lt;code&gt;compatibility-filter&#x3D;Year:2018;Make:BMW&lt;/code&gt;, the items returned are items with brakes, 2018, or BMW in the title.&lt;br /&gt;&lt;br /&gt;The service uses the product attributes to determine whether the item is compatible. The service returns the attributes that are compatible and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.compatibilityMatch\&quot;&gt; CompatibilityMatchEnum&lt;/a&gt; value that indicates how well the item matches the attributes.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#478415\&quot;&gt;&lt;strong&gt;Tip:&lt;/strong&gt;&lt;/span&gt; See the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#s0-1-21-6-7-7-6-ReturnItemsthatareCompatiblewiththeKeywordandVehicle-9\&quot;&gt;Samples&lt;/a&gt; section for a detailed example.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Best Practice:&lt;/b&gt; Submit all of the &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attributes&lt;/a&gt; for the specific product.&lt;br /&gt;&lt;br /&gt;To find the attributes and values for a specific marketplace, you can use the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/category_tree/methods/getCompatibilityProperties\&quot;&gt;getCompatibilityProperties&lt;/a&gt; method in the &lt;a href&#x3D;\&quot;/api-docs/commerce/taxonomy/resources/methods\&quot;&gt;Taxonomy API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For more details, see &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#Check\&quot;&gt;Check compatibility&lt;/a&gt; in the Buy Integration Guide.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; Testing in Sandbox is only supported using mock data. See &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#sbox-test\&quot;&gt;Testing search in the Sandbox&lt;/a&gt; for details.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;q&lt;/b&gt; (keyword)&lt;/li&gt;&lt;li&gt;One fitment supported category ID (such as &lt;code&gt;33559&lt;/code&gt; Brakes)&lt;/li&gt;&lt;li&gt;At least one &lt;a href&#x3D;\&quot;/api-docs/buy/static/api-browse.html#product-attributes\&quot;&gt;product attribute&lt;/a&gt; name/value pair&lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/gct:CompatibilityFilter (optional)
     * @param string $epid                 The ePID is the eBay product identifier of a product from the eBay product catalog. This field limits the results to only items in the specified ePID. &lt;br /&gt;&lt;br /&gt;The &lt;b&gt; Marketing&lt;/b&gt; API &lt;b&gt;getMerchandisedProducts&lt;/b&gt; method and the &lt;b&gt;Browse&lt;/b&gt; API &lt;b&gt; getItem&lt;/b&gt;, &lt;b&gt; getItemByLegacyId&lt;/b&gt;, and &lt;b&gt; getItemsByItemGroup&lt;/b&gt; calls return the ePID of the product.  You can also use the &lt;a href&#x3D;\&quot;/api-docs/commerce/catalog/resources/product_summary/methods/search\&quot;&gt;product_summary/search&lt;/a&gt; method in the &lt;b&gt;Catalog&lt;/b&gt; API to search for the ePID of the product. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?epid&#x3D;15032&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Maximum: &lt;/b&gt; 1    &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have  &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;,  &lt;b&gt; gtin&lt;/b&gt;,  or &lt;b&gt; q&lt;/b&gt;  (or any combination of these) (optional)
     * @param string $fieldgroups          This field is a comma separated list of values that lets you control what is returned in the response. The default is &lt;b&gt; MATCHING_ITEMS&lt;/b&gt;, which returns the items that match the keyword or category specified. The other values return data that can be used to create histograms or provide additional information.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Valid Values:&lt;/b&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt; ASPECT_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.aspectDistributions\&quot;&gt;aspectDistributions&lt;/a&gt; container, which has the &lt;b&gt;dominantCategoryId&lt;/b&gt;, &lt;b&gt;matchCount&lt;/b&gt;, and &lt;b&gt;refinementHref&lt;/b&gt; for the various aspects of the items found. For example, if you searched for &#39;Mustang&#39;, some of the aspect would be &lt;b&gt;Model Year&lt;/b&gt;, &lt;b&gt;Exterior Color&lt;/b&gt;, &lt;b&gt;Vehicle Mileage&lt;/b&gt;, etc.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt; &lt;b&gt;Note:&lt;/b&gt; ASPECT_REFINEMENTS are category specific.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;BUYING_OPTION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.buyingOptionDistributions\&quot;&gt;buyingOptionDistributions&lt;/a&gt;  container, which has the &lt;b&gt;matchCount&lt;/b&gt; and &lt;b&gt;refinementHref&lt;/b&gt; for &lt;b&gt;AUCTION&lt;/b&gt;, &lt;b&gt;FIXED_PRICE&lt;/b&gt; (Buy It Now), and &lt;b&gt;CLASSIFIED_AD&lt;/b&gt; items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CATEGORY_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.categoryDistributions\&quot;&gt;categoryDistributions&lt;/a&gt; container, which has the categories that the item is in.&lt;/li&gt;&lt;li&gt;&lt;b&gt;CONDITION_REFINEMENTS&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;#response.refinement.conditionDistributions\&quot;&gt;conditionDistributions&lt;/a&gt;  container, such as &lt;b&gt;NEW&lt;/b&gt;, &lt;b&gt;USED&lt;/b&gt;, etc. Within these groups are multiple states of the condition. For example, &lt;b&gt;New&lt;/b&gt; can be New without tag, New in box, New without box, etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;EXTENDED&lt;/b&gt; - This returns the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.shortDescription\&quot;&gt;shortDescription&lt;/a&gt; field, which provides condition and item aspect information and the &lt;a href&#x3D;\&quot;/api-docs/buy/browse/resources/item_summary/methods/search#response.itemSummaries.itemLocation.city\&quot;&gt;itemLocation.city&lt;/a&gt; field.&lt;/li&gt;&lt;li&gt;&lt;b&gt;MATCHING_ITEMS&lt;/b&gt; - This is meant to be used with one or more of the refinement values above. You use this to return the specified refinements and all the matching items.&lt;/li&gt;&lt;li&gt;&lt;b&gt;FULL&lt;/b&gt; - This returns all the refinement containers and all the matching items.&lt;/li&gt;&lt;/ul&gt;Code so that your app gracefully handles any future changes to this list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; MATCHING_ITEMS (optional)
     * @param string $filter               An array of field filters that can be used to limit/customize the result set. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also combine filters. &lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;shirt&amp;filter&#x3D;price:[10..50],sellers:{rpseller|bigSal}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;span style&#x3D;\&quot;color:#004680\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt; Refer to &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html\&quot;&gt;Buy API Field Filters&lt;/a&gt; for details and examples of all supported filters.&lt;/span&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:FilterField (optional)
     * @param string $gtin                 This field lets you search by the Global Trade Item Number of the item as defined by &lt;a href&#x3D;\&quot;https://www.gtin.info \&quot; target&#x3D;\&quot;_blank\&quot;&gt;https://www.gtin.info&lt;/a&gt;. You can search only by UPC (Universal Product Code). If you have other formats of GTIN, you need to search by keyword.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt; For example: &lt;/b&gt;&lt;br/&gt;&lt;code&gt; /buy/browse/v1/item_summary/search?gtin&#x3D;099482432621&lt;/code&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt; Maximum: &lt;/b&gt; 1     &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Required: &lt;/b&gt; The method must have &lt;b&gt; category_ids&lt;/b&gt;, &lt;b&gt; epid&lt;/b&gt;, &lt;b&gt; gtin&lt;/b&gt;, or &lt;b&gt; q&lt;/b&gt; (or any combination of these) (optional)
     * @param string $limit                The number of items from the result set returned in a single page. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; If a value is set in the &lt;b&gt;limit&lt;/b&gt; field, the value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the &lt;b&gt;limit&lt;/b&gt; value. An error is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 50 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items per page (limit):&lt;/b&gt; 200  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items in a result set:&lt;/b&gt; 10,000 (optional)
     * @param string $offset               Specifies the number of items to skip in the result set. This is used with the &lt;b&gt;limit&lt;/b&gt; field to control the pagination of the output. &lt;br /&gt;&lt;br /&gt;For example, if &lt;b&gt;offset&lt;/b&gt; is 0 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 1-10 from the list of items returned; if &lt;b&gt;offset&lt;/b&gt; is 10 and &lt;b&gt;limit&lt;/b&gt; is 10, the method will retrieve items 11-20 from the list of items returned. &lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; The value of &lt;b&gt;offset&lt;/b&gt; must be either zero or a multiple of the value set in the &lt;b&gt;limit&lt;/b&gt; field. An empty result set is returned for invalid values of &lt;b&gt;offset&lt;/b&gt;.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Valid Values&lt;/b&gt;: 0-10,000 (inclusive) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Default:&lt;/b&gt; 0 &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Maximum number of items returned:&lt;/b&gt; 10,000 (optional)
     * @param string $q                    A string consisting of one or more keywords that are used to search for items on eBay. The keywords are handled as follows:&lt;ul&gt;&lt;li&gt;If the keywords are separated by a space, it is treated as an AND. In the following example, the query returns items that have iphone &lt;b&gt;AND&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;iphone ipad&lt;/code&gt;&lt;br/&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If the keywords are input using parentheses and separated by a comma, or if they are URL-encoded, it is treated as an OR. In the following examples, the query returns items that have iphone &lt;b&gt;OR&lt;/b&gt; ipad.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;(iphone, ipad)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/buy/browse/v1/item_summary/search?q&#x3D;%28iphone%2c%20ipad%29&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Restriction:&lt;/b&gt; The &lt;code&gt;*&lt;/code&gt; wildcard character is &lt;b&gt;not&lt;/b&gt; allowed in this field.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Required:&lt;/b&gt; The method must have &lt;b&gt;category_ids&lt;/b&gt;, &lt;b&gt;epid&lt;/b&gt;, &lt;b&gt;gtin&lt;/b&gt;, or &lt;b&gt;q&lt;/b&gt; (or any combination of these). (optional)
     * @param string $sort                 The order and field name that is used to sort the items. &lt;br /&gt;&lt;br /&gt;You can sort items by price, distance, or listing date. To sort in descending order, insert a hyphen (&lt;code&gt;-&lt;/code&gt;) before the name of the sorting option. If no &lt;b&gt;sort&lt;/b&gt; parameter is submitted, the result set is sorted by &amp;quot;&lt;a href&#x3D;\&quot;https://pages.ebay.com/help/sell/searchstanding.html \&quot; target&#x3D;\&quot;_blank\&quot;&gt;Best Match&lt;/a&gt;&amp;quot;.&lt;br /&gt;&lt;br /&gt;Here are some examples showing how to use the &lt;b&gt;sort&lt;/b&gt; query parameter:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;distance&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;distance&lt;/i&gt; in ascending order (shortest distance first). This sorting option is only applicable if the &lt;a href&#x3D;\&quot;/api-docs/buy/static/ref-buy-browse-filters.html#pickupCountry\&quot;&gt;pickup&lt;/a&gt; filters are used, and only ascending order is supported.&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;-price&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;price + shipping cost&lt;/i&gt; in descending order (highest price first). This sorting option (by &lt;i&gt;price&lt;/i&gt;) is only guaranteed to work correctly if the &lt;b&gt;X-EBAY-C-ENDUSERCTX&lt;/b&gt; request header is used, with the &lt;b&gt;contextualLocation&lt;/b&gt; parameter being used to set the delivery country and postal code. Here is an example of how this header would be used to do this (note the URL encoding):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;X-EBAY-C-ENDUSERCTX: contextualLocation&#x3D;country%3DUS%2Czip%3D19406&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;newlyListed&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;listing date&lt;/i&gt; (most recently listed/newest items first).&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;code&gt;sort&#x3D;endingSoonest&lt;/code&gt;&lt;/b&gt; - This sorts by &lt;i&gt;date/time&lt;/i&gt; the listing ends (listings nearest to end date/time first).&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Default:&lt;/b&gt; Ascending For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/buy/browse/types/cos:SortField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Psr7\Request
     */
    public function searchRequest($aspect_filter = null, $auto_correct = null, $category_ids = null, $charity_ids = null, $compatibility_filter = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
    {
        $resourcePath = '/item_summary/search';
        $formParams = [];
        $queryParams = [];
        $headerParams = [];
        $httpBody = '';
        $multipart = false;

        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $aspect_filter,
            'aspect_filter', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $auto_correct,
            'auto_correct', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $category_ids,
            'category_ids', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $charity_ids,
            'charity_ids', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $compatibility_filter,
            'compatibility_filter', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $epid,
            'epid', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $fieldgroups,
            'fieldgroups', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $filter,
            'filter', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $gtin,
            'gtin', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $limit,
            'limit', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $offset,
            'offset', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $q,
            'q', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);
        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $sort,
            'sort', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);

        if ($multipart) {
            $headers = $this->headerSelector->selectHeadersForMultipart(
                ['application/json']
            );
        } else {
            $headers = $this->headerSelector->selectHeaders(
                ['application/json'],
                []
            );
        }

        // For model (json/xml)
        if (count($formParams) > 0) {
            if ($multipart) {
                $multipartContents = [];

                foreach ($formParams as $formParamName => $formParamValue) {
                    $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
                    foreach ($formParamValueItems as $formParamValueItem) {
                        $multipartContents[] = [
                            'name' => $formParamName,
                            'contents' => $formParamValueItem,
                        ];
                    }
                }

                // For HTTP post (form)
                $httpBody = new MultipartStream($multipartContents);
            } elseif ($headers['Content-Type'] === 'application/json') {
                $httpBody = \GuzzleHttp\json_encode($formParams);
            } else {
                // For HTTP post (form)
                $httpBody = ObjectSerializer::buildQuery($queryParams);
            }
        }

        // this endpoint requires OAuth (access token)
        if (! empty($this->config->getAccessToken())) {
            $headers['Authorization'] = 'Bearer '.$this->config->getAccessToken();
        }
        // this endpoint requires OAuth (access token)
        if (! empty($this->config->getAccessToken())) {
            $headers['Authorization'] = 'Bearer '.$this->config->getAccessToken();
        }

        $defaultHeaders = [];
        if ($this->config->getUserAgent()) {
            $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
        }

        $headers = array_merge(
            $defaultHeaders,
            $headerParams,
            $headers
        );

        $query = ObjectSerializer::buildQuery($queryParams);

        return new Request(
            'GET',
            $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''),
            $headers,
            $httpBody
        );
    }

    /**
     * Create http client option.
     *
     * @throws \RuntimeException on file opening failure
     *
     * @return array of http client options
     */
    protected function createHttpClientOption()
    {
        $options = [];

        if ($this->config->getDebug()) {
            $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'ab');

            if (! $options[RequestOptions::DEBUG]) {
                throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile());
            }
        }

        return $options;
    }
}