brandon14/ebay-sdk-php

View on GitHub
src/Sell/Finances/V1/Api/TransactionApi.php

Summary

Maintainability
F
1 wk
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);

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

/**
 * eBay Finances API.
 *
 * This API is used to retrieve seller payouts and monetary transaction details related to those payouts.
 *
 * The version of the OpenAPI document: v1.15.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\Sell\Finances\V1\Api;

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

/**
 * TransactionApi Class Doc Comment.
 *
 * @category Class
 *
 * @author   OpenAPI Generator team
 *
 * @see     https://openapi-generator.tech
 */
class TransactionApi
{
    /**
     * @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 getTransactionSummary.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactionSummary&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. The &lt;b&gt;transactionStatus&lt;/b&gt; filter must be used. All other filters are optional. &lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: the data returned in the response pertains to the sales, payouts, and transfer status set. The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) have been paid out to the seller&#39;s bank account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use when setting up the &lt;b&gt;transactionStatus&lt;/b&gt; filter: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionStatus:&amp;#123;PAYOUT&amp;#125;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: only consider monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionDate:&amp;#91;2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z&amp;#93;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: only consider a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: only consider monetary transactions involving a specific buyer (specified with the buyer&#39;s eBay user ID). Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;buyerUsername:&amp;#123;buyer1234&amp;#125;&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: only consider monetary transactions corresponding to a specific order (identified with a Selling Manager order identifier). Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;salesRecordReference:&amp;#123;123&amp;#125;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date.&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: only consider monetary transactions related to a specific seller payout (identified with a Payout ID). This value is auto-generated by eBay once the seller payout is set to be processed. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;payoutId:&amp;#123;5********8&amp;#125;&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;transactionId&lt;/b&gt; value are returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;orderId&lt;/b&gt; value are returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     *
     * @throws \TNT\Ebay\Sell\Finances\V1\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     *
     * @return \TNT\Ebay\Sell\Finances\V1\Model\TransactionSummaryResponse
     */
    public function getTransactionSummary($x_ebay_c_marketplace_id = null, $filter = null)
    {
        [$response] = $this->getTransactionSummaryWithHttpInfo($x_ebay_c_marketplace_id, $filter);

        return $response;
    }

    /**
     * Operation getTransactionSummaryWithHttpInfo.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactionSummary&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. The &lt;b&gt;transactionStatus&lt;/b&gt; filter must be used. All other filters are optional. &lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: the data returned in the response pertains to the sales, payouts, and transfer status set. The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) have been paid out to the seller&#39;s bank account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use when setting up the &lt;b&gt;transactionStatus&lt;/b&gt; filter: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionStatus:&amp;#123;PAYOUT&amp;#125;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: only consider monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionDate:&amp;#91;2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z&amp;#93;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: only consider a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: only consider monetary transactions involving a specific buyer (specified with the buyer&#39;s eBay user ID). Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;buyerUsername:&amp;#123;buyer1234&amp;#125;&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: only consider monetary transactions corresponding to a specific order (identified with a Selling Manager order identifier). Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;salesRecordReference:&amp;#123;123&amp;#125;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date.&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: only consider monetary transactions related to a specific seller payout (identified with a Payout ID). This value is auto-generated by eBay once the seller payout is set to be processed. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;payoutId:&amp;#123;5********8&amp;#125;&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;transactionId&lt;/b&gt; value are returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;orderId&lt;/b&gt; value are returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     *
     * @throws \TNT\Ebay\Sell\Finances\V1\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     *
     * @return array of \TNT\Ebay\Sell\Finances\V1\Model\TransactionSummaryResponse, HTTP status code, HTTP response headers (array of strings)
     */
    public function getTransactionSummaryWithHttpInfo($x_ebay_c_marketplace_id = null, $filter = null)
    {
        $request = $this->getTransactionSummaryRequest($x_ebay_c_marketplace_id, $filter);

        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\Sell\Finances\V1\Model\TransactionSummaryResponse' === '\SplFileObject') {
                        $content = $response->getBody(); // Stream goes to serializer.
                    } else {
                        $content = (string) $response->getBody();
                    }

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

            $returnType = '\TNT\Ebay\Sell\Finances\V1\Model\TransactionSummaryResponse';

            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\Sell\Finances\V1\Model\TransactionSummaryResponse',
                        $e->getResponseHeaders()
                    );
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation getTransactionSummaryAsync.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactionSummary&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. The &lt;b&gt;transactionStatus&lt;/b&gt; filter must be used. All other filters are optional. &lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: the data returned in the response pertains to the sales, payouts, and transfer status set. The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) have been paid out to the seller&#39;s bank account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use when setting up the &lt;b&gt;transactionStatus&lt;/b&gt; filter: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionStatus:&amp;#123;PAYOUT&amp;#125;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: only consider monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionDate:&amp;#91;2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z&amp;#93;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: only consider a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: only consider monetary transactions involving a specific buyer (specified with the buyer&#39;s eBay user ID). Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;buyerUsername:&amp;#123;buyer1234&amp;#125;&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: only consider monetary transactions corresponding to a specific order (identified with a Selling Manager order identifier). Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;salesRecordReference:&amp;#123;123&amp;#125;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date.&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: only consider monetary transactions related to a specific seller payout (identified with a Payout ID). This value is auto-generated by eBay once the seller payout is set to be processed. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;payoutId:&amp;#123;5********8&amp;#125;&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;transactionId&lt;/b&gt; value are returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;orderId&lt;/b&gt; value are returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getTransactionSummaryAsync($x_ebay_c_marketplace_id = null, $filter = null)
    {
        return $this->getTransactionSummaryAsyncWithHttpInfo($x_ebay_c_marketplace_id, $filter)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }

    /**
     * Operation getTransactionSummaryAsyncWithHttpInfo.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactionSummary&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. The &lt;b&gt;transactionStatus&lt;/b&gt; filter must be used. All other filters are optional. &lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: the data returned in the response pertains to the sales, payouts, and transfer status set. The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) have been paid out to the seller&#39;s bank account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use when setting up the &lt;b&gt;transactionStatus&lt;/b&gt; filter: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionStatus:&amp;#123;PAYOUT&amp;#125;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: only consider monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionDate:&amp;#91;2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z&amp;#93;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: only consider a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: only consider monetary transactions involving a specific buyer (specified with the buyer&#39;s eBay user ID). Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;buyerUsername:&amp;#123;buyer1234&amp;#125;&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: only consider monetary transactions corresponding to a specific order (identified with a Selling Manager order identifier). Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;salesRecordReference:&amp;#123;123&amp;#125;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date.&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: only consider monetary transactions related to a specific seller payout (identified with a Payout ID). This value is auto-generated by eBay once the seller payout is set to be processed. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;payoutId:&amp;#123;5********8&amp;#125;&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;transactionId&lt;/b&gt; value are returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;orderId&lt;/b&gt; value are returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getTransactionSummaryAsyncWithHttpInfo($x_ebay_c_marketplace_id = null, $filter = null)
    {
        $returnType = '\TNT\Ebay\Sell\Finances\V1\Model\TransactionSummaryResponse';
        $request = $this->getTransactionSummaryRequest($x_ebay_c_marketplace_id, $filter);

        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 'getTransactionSummary'.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactionSummary&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. The &lt;b&gt;transactionStatus&lt;/b&gt; filter must be used. All other filters are optional. &lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: the data returned in the response pertains to the sales, payouts, and transfer status set. The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) have been paid out to the seller&#39;s bank account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: only consider monetary transactions where the proceeds from the sales order(s) are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use when setting up the &lt;b&gt;transactionStatus&lt;/b&gt; filter: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionStatus:&amp;#123;PAYOUT&amp;#125;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: only consider monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionDate:&amp;#91;2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z&amp;#93;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: only consider a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: only consider monetary transactions involving a specific buyer (specified with the buyer&#39;s eBay user ID). Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;buyerUsername:&amp;#123;buyer1234&amp;#125;&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: only consider monetary transactions corresponding to a specific order (identified with a Selling Manager order identifier). Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;salesRecordReference:&amp;#123;123&amp;#125;&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date.&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: only consider monetary transactions related to a specific seller payout (identified with a Payout ID). This value is auto-generated by eBay once the seller payout is set to be processed. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;payoutId:&amp;#123;5********8&amp;#125;&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;transactionId&lt;/b&gt; value are returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the monetary transaction(s) associated with this &lt;b&gt;orderId&lt;/b&gt; value are returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction_summary?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Psr7\Request
     */
    public function getTransactionSummaryRequest($x_ebay_c_marketplace_id = null, $filter = null)
    {
        $resourcePath = '/transaction_summary';
        $formParams = [];
        $queryParams = [];
        $headerParams = [];
        $httpBody = '';
        $multipart = false;

        // query params
        $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
            $filter,
            'filter', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);

        // header params
        if ($x_ebay_c_marketplace_id !== null) {
            $headerParams['X-EBAY-C-MARKETPLACE-ID'] = ObjectSerializer::toHeaderValue($x_ebay_c_marketplace_id);
        }

        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();
        }

        $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
        );
    }

    /**
     * Operation getTransactions.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactions&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. If none of these filters are used, all monetary transactions from the last 90 days are returned:&lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: search for monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionDate:[2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z]&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: search for a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: this filter type is only applicable for sales orders, and allows the user to filter seller payouts in a particular state.  The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order has been paid out to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: this indicates that the funds for the corresponding monetary transaction are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by transaction status: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionStatus:{PAYOUT}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: the eBay user ID of the buyer involved in the monetary transaction. Only monetary transactions involving this buyer are returned. Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;buyerUsername:{buyer1234}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: the unique Selling Manager identifier of the order involved in the monetary transaction. Only monetary transactions involving this Selling Manager Sales Record ID are returned. Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;salesRecordReference:{123}&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: the unique identifier of a seller payout. This value is auto-generated by eBay once the seller payout is set to be processed. Only monetary transactions involving this Payout ID are returned. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;payoutId:{5********8}&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction defined by the identifier is returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the sales order defined by the identifier is returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     * @param string $limit                   The number of monetary transactions to return per page of the result set. Use this parameter in conjunction with the &lt;b&gt;offset&lt;/b&gt; parameter to control the pagination of the output. &lt;br /&gt;&lt;br /&gt; For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves monetary transactions 11 thru 20 from the result set. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;. If an &lt;b&gt;orderId&lt;/b&gt;, &lt;b&gt;transactionId&lt;/b&gt;, or &lt;b&gt;payoutId&lt;/b&gt; filter is included in the request, any &lt;b&gt;limit&lt;/b&gt; value will be ignored.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt;Maximum:&lt;/b&gt;&lt;code&gt; 1000&lt;/code&gt; &lt;br /&gt; &lt;b&gt;Default:&lt;/b&gt;&lt;code&gt; 20&lt;/code&gt; (optional)
     * @param string $offset                  This integer value indicates the actual position that the first monetary transaction returned on the current page has in the results set. So, if you wanted to view the 11th monetary transaction of the result set, you would set the &lt;strong&gt;offset&lt;/strong&gt; value in the request to &lt;code&gt;10&lt;/code&gt;. &lt;br&gt;&lt;br&gt;In the request, you can use the &lt;b&gt;offset&lt;/b&gt; parameter in conjunction with the &lt;b&gt;limit&lt;/b&gt; parameter to control the pagination of the output. For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;30&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves transactions 31 thru 40 from the resulting collection of transactions. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;.&lt;/span&gt;&lt;br/&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;code&gt;0&lt;/code&gt; (zero) (optional)
     * @param string $sort                    Sorting is not yet available for the &lt;b&gt;getTransactions&lt;/b&gt; method. By default, monetary transactions that match the input criteria are sorted in descending order according to the transaction date. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:SortField (optional)
     *
     * @throws \TNT\Ebay\Sell\Finances\V1\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     *
     * @return \TNT\Ebay\Sell\Finances\V1\Model\Transactions
     */
    public function getTransactions($x_ebay_c_marketplace_id = null, $filter = null, $limit = null, $offset = null, $sort = null)
    {
        [$response] = $this->getTransactionsWithHttpInfo($x_ebay_c_marketplace_id, $filter, $limit, $offset, $sort);

        return $response;
    }

    /**
     * Operation getTransactionsWithHttpInfo.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactions&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. If none of these filters are used, all monetary transactions from the last 90 days are returned:&lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: search for monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionDate:[2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z]&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: search for a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: this filter type is only applicable for sales orders, and allows the user to filter seller payouts in a particular state.  The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order has been paid out to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: this indicates that the funds for the corresponding monetary transaction are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by transaction status: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionStatus:{PAYOUT}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: the eBay user ID of the buyer involved in the monetary transaction. Only monetary transactions involving this buyer are returned. Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;buyerUsername:{buyer1234}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: the unique Selling Manager identifier of the order involved in the monetary transaction. Only monetary transactions involving this Selling Manager Sales Record ID are returned. Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;salesRecordReference:{123}&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: the unique identifier of a seller payout. This value is auto-generated by eBay once the seller payout is set to be processed. Only monetary transactions involving this Payout ID are returned. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;payoutId:{5********8}&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction defined by the identifier is returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the sales order defined by the identifier is returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     * @param string $limit                   The number of monetary transactions to return per page of the result set. Use this parameter in conjunction with the &lt;b&gt;offset&lt;/b&gt; parameter to control the pagination of the output. &lt;br /&gt;&lt;br /&gt; For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves monetary transactions 11 thru 20 from the result set. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;. If an &lt;b&gt;orderId&lt;/b&gt;, &lt;b&gt;transactionId&lt;/b&gt;, or &lt;b&gt;payoutId&lt;/b&gt; filter is included in the request, any &lt;b&gt;limit&lt;/b&gt; value will be ignored.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt;Maximum:&lt;/b&gt;&lt;code&gt; 1000&lt;/code&gt; &lt;br /&gt; &lt;b&gt;Default:&lt;/b&gt;&lt;code&gt; 20&lt;/code&gt; (optional)
     * @param string $offset                  This integer value indicates the actual position that the first monetary transaction returned on the current page has in the results set. So, if you wanted to view the 11th monetary transaction of the result set, you would set the &lt;strong&gt;offset&lt;/strong&gt; value in the request to &lt;code&gt;10&lt;/code&gt;. &lt;br&gt;&lt;br&gt;In the request, you can use the &lt;b&gt;offset&lt;/b&gt; parameter in conjunction with the &lt;b&gt;limit&lt;/b&gt; parameter to control the pagination of the output. For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;30&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves transactions 31 thru 40 from the resulting collection of transactions. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;.&lt;/span&gt;&lt;br/&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;code&gt;0&lt;/code&gt; (zero) (optional)
     * @param string $sort                    Sorting is not yet available for the &lt;b&gt;getTransactions&lt;/b&gt; method. By default, monetary transactions that match the input criteria are sorted in descending order according to the transaction date. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:SortField (optional)
     *
     * @throws \TNT\Ebay\Sell\Finances\V1\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     *
     * @return array of \TNT\Ebay\Sell\Finances\V1\Model\Transactions, HTTP status code, HTTP response headers (array of strings)
     */
    public function getTransactionsWithHttpInfo($x_ebay_c_marketplace_id = null, $filter = null, $limit = null, $offset = null, $sort = null)
    {
        $request = $this->getTransactionsRequest($x_ebay_c_marketplace_id, $filter, $limit, $offset, $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\Sell\Finances\V1\Model\Transactions' === '\SplFileObject') {
                        $content = $response->getBody(); // Stream goes to serializer.
                    } else {
                        $content = (string) $response->getBody();
                    }

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

            $returnType = '\TNT\Ebay\Sell\Finances\V1\Model\Transactions';

            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\Sell\Finances\V1\Model\Transactions',
                        $e->getResponseHeaders()
                    );
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation getTransactionsAsync.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactions&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. If none of these filters are used, all monetary transactions from the last 90 days are returned:&lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: search for monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionDate:[2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z]&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: search for a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: this filter type is only applicable for sales orders, and allows the user to filter seller payouts in a particular state.  The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order has been paid out to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: this indicates that the funds for the corresponding monetary transaction are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by transaction status: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionStatus:{PAYOUT}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: the eBay user ID of the buyer involved in the monetary transaction. Only monetary transactions involving this buyer are returned. Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;buyerUsername:{buyer1234}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: the unique Selling Manager identifier of the order involved in the monetary transaction. Only monetary transactions involving this Selling Manager Sales Record ID are returned. Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;salesRecordReference:{123}&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: the unique identifier of a seller payout. This value is auto-generated by eBay once the seller payout is set to be processed. Only monetary transactions involving this Payout ID are returned. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;payoutId:{5********8}&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction defined by the identifier is returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the sales order defined by the identifier is returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     * @param string $limit                   The number of monetary transactions to return per page of the result set. Use this parameter in conjunction with the &lt;b&gt;offset&lt;/b&gt; parameter to control the pagination of the output. &lt;br /&gt;&lt;br /&gt; For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves monetary transactions 11 thru 20 from the result set. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;. If an &lt;b&gt;orderId&lt;/b&gt;, &lt;b&gt;transactionId&lt;/b&gt;, or &lt;b&gt;payoutId&lt;/b&gt; filter is included in the request, any &lt;b&gt;limit&lt;/b&gt; value will be ignored.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt;Maximum:&lt;/b&gt;&lt;code&gt; 1000&lt;/code&gt; &lt;br /&gt; &lt;b&gt;Default:&lt;/b&gt;&lt;code&gt; 20&lt;/code&gt; (optional)
     * @param string $offset                  This integer value indicates the actual position that the first monetary transaction returned on the current page has in the results set. So, if you wanted to view the 11th monetary transaction of the result set, you would set the &lt;strong&gt;offset&lt;/strong&gt; value in the request to &lt;code&gt;10&lt;/code&gt;. &lt;br&gt;&lt;br&gt;In the request, you can use the &lt;b&gt;offset&lt;/b&gt; parameter in conjunction with the &lt;b&gt;limit&lt;/b&gt; parameter to control the pagination of the output. For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;30&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves transactions 31 thru 40 from the resulting collection of transactions. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;.&lt;/span&gt;&lt;br/&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;code&gt;0&lt;/code&gt; (zero) (optional)
     * @param string $sort                    Sorting is not yet available for the &lt;b&gt;getTransactions&lt;/b&gt; method. By default, monetary transactions that match the input criteria are sorted in descending order according to the transaction date. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:SortField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getTransactionsAsync($x_ebay_c_marketplace_id = null, $filter = null, $limit = null, $offset = null, $sort = null)
    {
        return $this->getTransactionsAsyncWithHttpInfo($x_ebay_c_marketplace_id, $filter, $limit, $offset, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }

    /**
     * Operation getTransactionsAsyncWithHttpInfo.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactions&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. If none of these filters are used, all monetary transactions from the last 90 days are returned:&lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: search for monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionDate:[2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z]&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: search for a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: this filter type is only applicable for sales orders, and allows the user to filter seller payouts in a particular state.  The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order has been paid out to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: this indicates that the funds for the corresponding monetary transaction are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by transaction status: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionStatus:{PAYOUT}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: the eBay user ID of the buyer involved in the monetary transaction. Only monetary transactions involving this buyer are returned. Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;buyerUsername:{buyer1234}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: the unique Selling Manager identifier of the order involved in the monetary transaction. Only monetary transactions involving this Selling Manager Sales Record ID are returned. Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;salesRecordReference:{123}&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: the unique identifier of a seller payout. This value is auto-generated by eBay once the seller payout is set to be processed. Only monetary transactions involving this Payout ID are returned. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;payoutId:{5********8}&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction defined by the identifier is returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the sales order defined by the identifier is returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     * @param string $limit                   The number of monetary transactions to return per page of the result set. Use this parameter in conjunction with the &lt;b&gt;offset&lt;/b&gt; parameter to control the pagination of the output. &lt;br /&gt;&lt;br /&gt; For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves monetary transactions 11 thru 20 from the result set. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;. If an &lt;b&gt;orderId&lt;/b&gt;, &lt;b&gt;transactionId&lt;/b&gt;, or &lt;b&gt;payoutId&lt;/b&gt; filter is included in the request, any &lt;b&gt;limit&lt;/b&gt; value will be ignored.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt;Maximum:&lt;/b&gt;&lt;code&gt; 1000&lt;/code&gt; &lt;br /&gt; &lt;b&gt;Default:&lt;/b&gt;&lt;code&gt; 20&lt;/code&gt; (optional)
     * @param string $offset                  This integer value indicates the actual position that the first monetary transaction returned on the current page has in the results set. So, if you wanted to view the 11th monetary transaction of the result set, you would set the &lt;strong&gt;offset&lt;/strong&gt; value in the request to &lt;code&gt;10&lt;/code&gt;. &lt;br&gt;&lt;br&gt;In the request, you can use the &lt;b&gt;offset&lt;/b&gt; parameter in conjunction with the &lt;b&gt;limit&lt;/b&gt; parameter to control the pagination of the output. For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;30&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves transactions 31 thru 40 from the resulting collection of transactions. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;.&lt;/span&gt;&lt;br/&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;code&gt;0&lt;/code&gt; (zero) (optional)
     * @param string $sort                    Sorting is not yet available for the &lt;b&gt;getTransactions&lt;/b&gt; method. By default, monetary transactions that match the input criteria are sorted in descending order according to the transaction date. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:SortField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
    public function getTransactionsAsyncWithHttpInfo($x_ebay_c_marketplace_id = null, $filter = null, $limit = null, $offset = null, $sort = null)
    {
        $returnType = '\TNT\Ebay\Sell\Finances\V1\Model\Transactions';
        $request = $this->getTransactionsRequest($x_ebay_c_marketplace_id, $filter, $limit, $offset, $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 'getTransactions'.
     *
     * @param string $x_ebay_c_marketplace_id This header identifies the seller&#39;s eBay marketplace. It is required for all marketplaces outside of the US. See &lt;a href&#x3D;\&quot;/api-docs/static/rest-request-components.html#marketpl \&quot; target&#x3D;\&quot;_blank \&quot;&gt;HTTP request headers&lt;/a&gt; for the marketplace ID values. (optional)
     * @param string $filter                  Numerous filters are available for the &lt;strong&gt;getTransactions&lt;/strong&gt; method, and these filters are discussed below. One or more of these filter types can be used. If none of these filters are used, all monetary transactions from the last 90 days are returned:&lt;ul&gt;&lt;li&gt;&lt;b&gt;transactionDate&lt;/b&gt;: search for monetary transactions that occurred within a specific range of dates.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; All dates must be input using UTC format (&lt;code&gt;YYYY-MM-DDTHH:MM:SS.SSSZ&lt;/code&gt;) and should be adjusted accordingly for the local timezone of the user.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a date range: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionDate:[2018-10-23T00:00:01.000Z..2018-11-09T00:00:01.000Z]&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, the user could omit the ending date, and the date range would include the starting date and up to 90 days past that date, or the current date if the starting date is less than 90 days in the past.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;transactionType&lt;/b&gt;: search for a specific type of monetary transaction. The supported &lt;b&gt;transactionType&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;SALE&lt;/code&gt;: a sales order.&lt;/li&gt;&lt;li&gt; &lt;code&gt;REFUND&lt;/code&gt;: a refund to the buyer after an order cancellation or return.&lt;/li&gt;&lt;li&gt;&lt;code&gt;CREDIT&lt;/code&gt;: a credit issued by eBay to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;DISPUTE&lt;/code&gt;: a monetary transaction associated with a payment dispute between buyer and seller.&lt;/li&gt;&lt;li&gt;&lt;code&gt;NON_SALE_CHARGE&lt;/code&gt;: a monetary transaction involving a seller transferring money to eBay for the balance of a charge for NON_SALE_CHARGE transactions (transactions that contain non-transactional seller fees). These can include a one-time payment, monthly/yearly subscription fees charged monthly, NRC charges, and fee credits.&lt;/li&gt;&lt;li&gt;&lt;code&gt;SHIPPING_LABEL&lt;/code&gt;: a monetary transaction where eBay is billing the seller for an eBay shipping label. Note that the shipping label functionality will initially only be available to a select number of sellers.&lt;/li&gt;&lt;li&gt;&lt;code&gt;TRANSFER&lt;/code&gt;: A transfer is a monetary transaction where eBay is billing the seller for reimbursement of a charge. An example of a transfer is a seller reimbursing eBay for a buyer refund.&lt;/li&gt;&lt;li&gt;&lt;code&gt;ADJUSTMENT&lt;/code&gt;: An adjustment is a monetary transaction where eBay is crediting or debiting the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;WITHDRAWAL&lt;/code&gt;: A withdrawal is a monetary transaction where the seller requests an on-demand payout from eBay.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; On-demand payout is not available for sellers who are already on a &lt;b&gt;daily&lt;/b&gt; payout schedule. In order to initiate an on-demand payout, a seller must be on a &lt;b&gt;weekly&lt;/b&gt;, &lt;b&gt;bi-weekly&lt;/b&gt;, or &lt;b&gt;monthly&lt;/b&gt; payout schedule.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;LOAN_REPAYMENT&lt;/code&gt;: A monetary transaction related to the repayment of an outstanding loan balance for approved participants enrolled in the &lt;a href&#x3D;\&quot;https://pages.ebay.com/sellercapital/ \&quot; target&#x3D;\&quot;_blank \&quot;&gt;eBay Seller Capital financing program&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;b&gt;Note:&lt;/b&gt; eBay Seller Capital financing is only available in select marketplaces. Refer to &lt;a href&#x3D;\&quot;/api-docs/sell/finances/overview.html#loans \&quot; target&#x3D;\&quot;_blank \&quot;&gt;Marketplace availability for eBay Seller Capital funding program&lt;/a&gt; for current marketplace eligibility.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by a monetary transaction type: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionType:{SALE}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionStatus&lt;/b&gt;: this filter type is only applicable for sales orders, and allows the user to filter seller payouts in a particular state.  The supported &lt;b&gt;transactionStatus&lt;/b&gt; values are as follows:&lt;ul&gt;&lt;li&gt;&lt;code&gt;PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order has been paid out to the seller&#39;s account.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_PROCESSING&lt;/code&gt;: this indicates that the funds for the corresponding monetary transaction are currently being processed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_AVAILABLE_FOR_PAYOUT&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are available for a seller payout, but processing has not yet begun.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FUNDS_ON_HOLD&lt;/code&gt;: this indicates that the proceeds from the corresponding sales order are currently being held by eBay, and are not yet available for a seller payout.&lt;/li&gt;&lt;li&gt;&lt;code&gt;COMPLETED&lt;/code&gt;: this indicates that the funds for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction have transferred and the transaction has completed.&lt;/li&gt;&lt;li&gt;&lt;code&gt;FAILED&lt;/code&gt;: this indicates the process has failed for the corresponding &lt;code&gt;TRANSFER&lt;/code&gt; monetary transaction. &lt;/li&gt;&lt;/ul&gt;Below is the proper syntax to use if filtering by transaction status: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionStatus:{PAYOUT}&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;buyerUsername&lt;/b&gt;: the eBay user ID of the buyer involved in the monetary transaction. Only monetary transactions involving this buyer are returned. Below is the proper syntax to use if filtering by a specific eBay buyer: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;buyerUsername:{buyer1234}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;salesRecordReference&lt;/b&gt;: the unique Selling Manager identifier of the order involved in the monetary transaction. Only monetary transactions involving this Selling Manager Sales Record ID are returned. Below is the proper syntax to use if filtering by a specific Selling Manager Sales Record ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;salesRecordReference:{123}&lt;/code&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; For all orders originating after February 1, 2020, a value of &lt;code&gt;0&lt;/code&gt; will be returned in the &lt;b&gt;salesRecordReference&lt;/b&gt; field. So, this filter will only be useful to retrieve orders than occurred before this date. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;payoutId&lt;/b&gt;: the unique identifier of a seller payout. This value is auto-generated by eBay once the seller payout is set to be processed. Only monetary transactions involving this Payout ID are returned. Below is the proper syntax to use if filtering by a specific Payout ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;payoutId:{5********8}&lt;/code&gt;  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transactionId&lt;/b&gt;: the unique identifier of a monetary transaction. For a sales order, the &lt;b&gt;orderId&lt;/b&gt; filter should be used instead. Only the monetary transaction defined by the identifier is returned.&lt;br /&gt;&lt;br /&gt;&lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This filter cannot be used alone; the &lt;b&gt;transactionType&lt;/b&gt; must also be specified when filtering by transaction ID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Below is the proper syntax to use if filtering by a specific transaction ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;transactionId:{0*-0***0-3***3}&amp;filter&#x3D;transactionType:{SALE}&lt;/code&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;orderId&lt;/b&gt;: the unique identifier of a sales order. For any other monetary transaction, the &lt;b&gt;transactionId&lt;/b&gt; filter should be used instead. Only the sales order defined by the identifier is returned. Below is the proper syntax to use if filtering by a specific order ID: &lt;br/&gt;&lt;br/&gt;&lt;code&gt;https://apiz.ebay.com/sell/finances/v1/transaction?filter&#x3D;orderId:{0*-0***0-3***3}&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt; For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:FilterField (optional)
     * @param string $limit                   The number of monetary transactions to return per page of the result set. Use this parameter in conjunction with the &lt;b&gt;offset&lt;/b&gt; parameter to control the pagination of the output. &lt;br /&gt;&lt;br /&gt; For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves monetary transactions 11 thru 20 from the result set. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;. If an &lt;b&gt;orderId&lt;/b&gt;, &lt;b&gt;transactionId&lt;/b&gt;, or &lt;b&gt;payoutId&lt;/b&gt; filter is included in the request, any &lt;b&gt;limit&lt;/b&gt; value will be ignored.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; &lt;b&gt;Maximum:&lt;/b&gt;&lt;code&gt; 1000&lt;/code&gt; &lt;br /&gt; &lt;b&gt;Default:&lt;/b&gt;&lt;code&gt; 20&lt;/code&gt; (optional)
     * @param string $offset                  This integer value indicates the actual position that the first monetary transaction returned on the current page has in the results set. So, if you wanted to view the 11th monetary transaction of the result set, you would set the &lt;strong&gt;offset&lt;/strong&gt; value in the request to &lt;code&gt;10&lt;/code&gt;. &lt;br&gt;&lt;br&gt;In the request, you can use the &lt;b&gt;offset&lt;/b&gt; parameter in conjunction with the &lt;b&gt;limit&lt;/b&gt; parameter to control the pagination of the output. For example, if &lt;b&gt;offset&lt;/b&gt; is set to &lt;code&gt;30&lt;/code&gt; and &lt;b&gt;limit&lt;/b&gt; is set to &lt;code&gt;10&lt;/code&gt;, the method retrieves transactions 31 thru 40 from the resulting collection of transactions. &lt;br /&gt;&lt;br /&gt; &lt;span class&#x3D;\&quot;tablenote\&quot;&gt;&lt;strong&gt;Note:&lt;/strong&gt; This feature employs a zero-based list, where the first item in the list has an offset of &lt;code&gt;0&lt;/code&gt;.&lt;/span&gt;&lt;br/&gt;&lt;b&gt;Default:&lt;/b&gt; &lt;code&gt;0&lt;/code&gt; (zero) (optional)
     * @param string $sort                    Sorting is not yet available for the &lt;b&gt;getTransactions&lt;/b&gt; method. By default, monetary transactions that match the input criteria are sorted in descending order according to the transaction date. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/finances/types/cos:SortField (optional)
     *
     * @throws \InvalidArgumentException
     *
     * @return \GuzzleHttp\Psr7\Request
     */
    public function getTransactionsRequest($x_ebay_c_marketplace_id = null, $filter = null, $limit = null, $offset = null, $sort = null)
    {
        $resourcePath = '/transaction';
        $formParams = [];
        $queryParams = [];
        $headerParams = [];
        $httpBody = '';
        $multipart = false;

        // 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(
            $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(
            $sort,
            'sort', // param base name
            'string', // openApiType
            'form', // style
            true // explode
        ) ?? []);

        // header params
        if ($x_ebay_c_marketplace_id !== null) {
            $headerParams['X-EBAY-C-MARKETPLACE-ID'] = ObjectSerializer::toHeaderValue($x_ebay_c_marketplace_id);
        }

        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();
        }

        $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;
    }
}