src/AvaTaxClient.php
/**
     * Create a refund for a transaction
     *
     * Create a refund for a transaction.
     * 
     * The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund
     * for a previously created `SalesInvoice` transaction. You can choose to create a full or partial refund, and
     * specify individual line items from the original sale for refund.
     * 
     * A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
     * sales, purchases, inventory transfer, and returns (also called refunds).
     * You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values:
     *  
     * * Lines
     * * Details (implies lines)
     * * Summary (implies details)
     * * Addresses
     *  
     * If you don't specify '$include' parameter, it will include both details and addresses.
     *
     * 
     * @param string $companyCode The code of the company that made the original sale
     * @param string $transactionCode The transaction code of the original sale
     * @param string $include A comma separated list of child objects to return underneath the primary object.
     * @param RefundTransactionModel $model Information about the refund to create
     * @return TransactionModel
     */
Create a refund for a transaction
Create a refund for a transaction.



A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
sales, purchases, inventory transfer, and returns (also called refunds).
You may specify one or more of the following values in the '$include' parameter to fetch additional nested data, using commas to separate multiple values.

Lines
Details (implies lines)
Summary (implies details)
Addresses

If you don't specify '$include' parameter, it will include both details and addresses.

@param string $companyCode The code of the company that made the original sale
@param string $transactionCode The transaction code of the original sale
@param string $include A comma separated list of child objects to return underneath the primary object.
@param RefundTransactionModel $model Information about the refund to create
@return TransactionModel
Create a refund for a transaction Create a refund for a transaction . A transaction represents a unique potentially taxable action that your company has recorded and transactions include actions like sales purchases inventory transfer and returns ( also called refunds ) . You may specify one or more of the following values in the ' $include ' parameter to fetch additional nested data using commas to separate multiple values . Lines Details ( implies lines ) Summary ( implies details ) Addresses If you don ' t specify ' $include ' parameter it will include both details and addresses . @param string $companyCode The code of the company that made the original sale @param string $transactionCode The transaction code of the original sale @param string $include A comma separated list of child objects to return underneath the primary object . @param RefundTransactionModel $model Information about the refund to create @return TransactionModel
public function refundTransaction($companyCode, $transactionCode, $include, $model)
    {
        $path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/refund";
        $guzzleParams = [
            'query' => ['$include' => $include],
            'body' => json_encode($model)
        ];
        return $this->restCall($path, 'POST', $guzzleParams);
    }
public function refundTransaction ( $ companyCode , $ transactionCode , $ include , $ model ) { $ path = " /api/v2/companies/ { $ companyCode } /transactions/ { $ transactionCode } /refund " ; $ guzzleParams = [ 'query' => [ '$include' => $ include ] , 'body' => json_encode ( $ model ) ] ; return $ this -> restCall ( $ path , 'POST' , $ guzzleParams ) ; }
Create a refund for a transaction
 Create a refund for a transaction.
Create a refund for a transaction Create a refund for a transaction .