Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PHP8 and Guzzle7 #138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AvaTaxClientBase
*
* @throws \Exception
*/
public function __construct($appName, $appVersion, $machineName="", $environment, $guzzleParams = [])
public function __construct($appName, $appVersion, $machineName="", $environment=null, $guzzleParams = [])
{
// app name and app version are mandatory fields.
if ($appName == "" || $appName == null || $appVersion == "" || $appVersion == null) {
Expand Down
34 changes: 17 additions & 17 deletions src/Methods.php
Original file line number Diff line number Diff line change
Expand Up @@ -4205,7 +4205,7 @@ public function listPreferredPrograms($filter=null, $top=null, $skip=null, $orde
* @param string $countryCode If not null, return all records with this code.
* @return FetchResult
*/
public function listProductClassificationSystems($filter=null, $top=null, $skip=null, $orderBy=null, $countryCode) {
public function listProductClassificationSystems($filter=null, $top=null, $skip=null, $orderBy=null, $countryCode=null) {
$path = "/api/v2/definitions/productclassificationsystems";
$guzzleParams = [
'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy, '$countryCode' => $countryCode],
Expand Down Expand Up @@ -4239,7 +4239,7 @@ public function listProductClassificationSystems($filter=null, $top=null, $skip=
* @param string $countryCode If not null, return all records with this code.
* @return FetchResult
*/
public function listProductClassificationSystemsByCompany($companyCode, $filter=null, $top=null, $skip=null, $orderBy=null, $countryCode) {
public function listProductClassificationSystemsByCompany($companyCode, $filter=null, $top=null, $skip=null, $orderBy=null, $countryCode=null) {
$path = "/api/v2/definitions/productclassificationsystems/bycompany/{$companyCode}";
$guzzleParams = [
'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy, '$countryCode' => $countryCode],
Expand Down Expand Up @@ -6622,7 +6622,7 @@ public function validateLocation($companyId, $id) {
* @param AdjustMultiDocumentModel $model The adjust request you wish to execute
* @return MultiDocumentModel
*/
public function adjustMultiDocumentTransaction($code, $type, $include=null, $model) {
public function adjustMultiDocumentTransaction($code, $type, $include=null, $model=null) {
$path = "/api/v2/transactions/multidocument/{$code}/type/{$type}/adjust";
$guzzleParams = [
'query' => ['include' => $include],
Expand Down Expand Up @@ -6768,7 +6768,7 @@ public function commitMultiDocumentTransaction($model) {
* @param CreateMultiDocumentModel $model the multi document transaction model
* @return MultiDocumentModel
*/
public function createMultiDocumentTransaction($include=null, $model) {
public function createMultiDocumentTransaction($include=null, $model=null) {
$path = "/api/v2/transactions/multidocument";
$guzzleParams = [
'query' => ['$include' => $include],
Expand Down Expand Up @@ -6986,7 +6986,7 @@ public function listMultiDocumentTransactions($filter=null, $include=null, $top=
* @param RefundTransactionModel $model Information about the refund to create
* @return MultiDocumentModel
*/
public function refundMultiDocumentTransaction($code, $type, $include=null, $model) {
public function refundMultiDocumentTransaction($code, $type, $include=null, $model=null) {
$path = "/api/v2/transactions/multidocument/{$code}/type/{$type}/refund";
$guzzleParams = [
'query' => ['$include' => $include],
Expand Down Expand Up @@ -9204,7 +9204,7 @@ public function updateTaxRule($companyId, $id, $model) {
* @param AddTransactionLineModel $model information about the transaction and lines to be added
* @return TransactionModel
*/
public function addLines($include=null, $model) {
public function addLines($include=null, $model=null) {
$path = "/api/v2/companies/transactions/lines/add";
$guzzleParams = [
'query' => ['$include' => $include],
Expand Down Expand Up @@ -9259,7 +9259,7 @@ public function addLines($include=null, $model) {
* @param AdjustTransactionModel $model The adjustment you wish to make
* @return TransactionModel
*/
public function adjustTransaction($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function adjustTransaction($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/adjust";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down Expand Up @@ -9436,7 +9436,7 @@ public function bulkLockTransaction($model) {
* @param ChangeTransactionCodeModel $model The code change request you wish to execute
* @return TransactionModel
*/
public function changeTransactionCode($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function changeTransactionCode($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/changecode";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down Expand Up @@ -9489,7 +9489,7 @@ public function changeTransactionCode($companyCode, $transactionCode, $documentT
* @param CommitTransactionModel $model The commit request you wish to execute
* @return TransactionModel
*/
public function commitTransaction($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function commitTransaction($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/commit";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down Expand Up @@ -9545,7 +9545,7 @@ public function commitTransaction($companyCode, $transactionCode, $documentType,
* @param CreateOrAdjustTransactionModel $model The transaction you wish to create or adjust
* @return TransactionModel
*/
public function createOrAdjustTransaction($include=null, $model) {
public function createOrAdjustTransaction($include=null, $model=null) {
$path = "/api/v2/transactions/createoradjust";
$guzzleParams = [
'query' => ['$include' => $include],
Expand Down Expand Up @@ -9608,7 +9608,7 @@ public function createOrAdjustTransaction($include=null, $model) {
* @param CreateTransactionModel $model The transaction you wish to create
* @return TransactionModel
*/
public function createTransaction($include=null, $model) {
public function createTransaction($include=null, $model=null) {
$path = "/api/v2/transactions/create";
$guzzleParams = [
'query' => ['$include' => $include],
Expand Down Expand Up @@ -9648,7 +9648,7 @@ public function createTransaction($include=null, $model) {
* @param RemoveTransactionLineModel $model information about the transaction and lines to be removed
* @return TransactionModel
*/
public function deleteLines($include=null, $model) {
public function deleteLines($include=null, $model=null) {
$path = "/api/v2/companies/transactions/lines/delete";
$guzzleParams = [
'query' => ['$include' => $include],
Expand Down Expand Up @@ -9885,7 +9885,7 @@ public function listTransactionsByCompany($companyCode, $dataSourceId, $include=
* @param LockTransactionModel $model The lock request you wish to execute
* @return TransactionModel
*/
public function lockTransaction($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function lockTransaction($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/lock";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down Expand Up @@ -9951,7 +9951,7 @@ public function lockTransaction($companyCode, $transactionCode, $documentType, $
* @param RefundTransactionModel $model Information about the refund to create
* @return TransactionModel
*/
public function refundTransaction($companyCode, $transactionCode, $include=null, $documentType, $useTaxDateOverride, $model) {
public function refundTransaction($companyCode, $transactionCode, $include=null, $documentType=null, $useTaxDateOverride=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/refund";
$guzzleParams = [
'query' => ['$include' => $include, 'documentType' => $documentType, 'useTaxDateOverride' => $useTaxDateOverride],
Expand Down Expand Up @@ -10004,7 +10004,7 @@ public function refundTransaction($companyCode, $transactionCode, $include=null,
* @param SettleTransactionModel $model The data from an external system to reconcile against AvaTax
* @return TransactionModel
*/
public function settleTransaction($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function settleTransaction($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/settle";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down Expand Up @@ -10147,7 +10147,7 @@ public function unvoidTransaction($companyCode, $transactionCode, $documentType,
* @param VerifyTransactionModel $model The data from an external system to reconcile against AvaTax
* @return TransactionModel
*/
public function verifyTransaction($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function verifyTransaction($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/verify";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down Expand Up @@ -10201,7 +10201,7 @@ public function verifyTransaction($companyCode, $transactionCode, $documentType,
* @param VoidTransactionModel $model The void request you wish to execute. To void a transaction the code must be set to 'DocVoided'
* @return TransactionModel
*/
public function voidTransaction($companyCode, $transactionCode, $documentType, $include=null, $model) {
public function voidTransaction($companyCode, $transactionCode, $documentType, $include=null, $model=null) {
$path = "/api/v2/companies/{$companyCode}/transactions/{$transactionCode}/void";
$guzzleParams = [
'query' => ['documentType' => $documentType, '$include' => $include],
Expand Down