Skip to content

Commit

Permalink
Major release: 3.0.0 (#163)
Browse files Browse the repository at this point in the history
* Update dependencies and support to 7.4 PHP

* Add bionic to Travis config

* PHP73 and dependencies

* Only test 73 and 74

* Remove PHP 7.4 and update tests

* Update dependencies and unit tests

* Php7.4 test in Travis

* Refactor ApPaymentRequest, Add APPYMT support, Refactor FulfillmentStatus for OETransactionLineCreate, Fix TransactionItemDetail for lotno and serialno

* Split date on DeliveryDate for FulfillmentStatus

* Refactor for 7.3 php support

* Add Timesheet Approve, Decline, and Update support

* Update copyright year 2021

* Add PlatformServices methods
Include sessionTimestamp and sessionTimeout in responses

* Fix clear primary and secondary email #164

* Adjust README for PHP version

* Code review updates
  • Loading branch information
intacctcoleenho authored Jan 9, 2021
1 parent b8188d3 commit 4a93555
Show file tree
Hide file tree
Showing 601 changed files with 5,043 additions and 3,422 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
language: php

php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

dist: bionic

before_script:
- composer self-update
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## System Requirements

* You must have an active Sage Intacct Web Services Developer license
* PHP >= 7.0
* PHP >= 7.3
* A recent version of cURL >= 7.19.4 compiled with OpenSSL and zlib
* [Composer](composer)

Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
}
],
"require": {
"php": ">=7.0",
"php": ">=7.3",
"ext-dom": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xmlwriter": "*",
"guzzlehttp/guzzle": "^6.2.3",
"ramsey/uuid": "^3.6.1",
"psr/log": "~1.0"
"guzzlehttp/guzzle": "^7.2.0",
"ramsey/uuid": "^4.1.1",
"psr/log": "^1.1.3"
},
"require-dev": {
"phpunit/phpunit": "^5.7.21",
"monolog/monolog": "^1.22.0",
"mikey179/vfsstream": "^1.6.4",
"phpmd/phpmd": "@stable",
"squizlabs/php_codesniffer": "3.*"
"phpunit/phpunit": "^9.5.0",
"monolog/monolog": "^2.2.0",
"mikey179/vfsstream": "^1.6.8",
"phpmd/phpmd": "^2.9.1",
"squizlabs/php_codesniffer": "^3.5.8"
},
"suggest": {
"monolog/monolog": "Allows more advanced logging of the application flow"
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Copyright 2020 Sage Intacct, Inc.
Copyright 2021 Sage Intacct, Inc.
Licensed under the Apache License, Version 2.0 (the "License"). You may not
use this file except in compliance with the License. You may obtain a copy
Expand Down
3 changes: 2 additions & 1 deletion src/Intacct/AbstractClient.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down Expand Up @@ -51,6 +51,7 @@ public function setConfig(ClientConfig $config)
$this->config = $config;
}


/**
* AbstractClient constructor.
*
Expand Down
40 changes: 39 additions & 1 deletion src/Intacct/ClientConfig.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down Expand Up @@ -140,6 +140,44 @@ public function setSessionId(string $sessionId)
$this->sessionId = $sessionId;
}

/** @var string */
private $sessionTimestamp = '';

/**
* @return string
*/
public function getSessionTimestamp(): string
{
return $this->sessionTimestamp;
}

/**
* @param string $sessionTimestamp
*/
public function setSessionTimestamp(string $sessionTimestamp): void
{
$this->sessionTimestamp = $sessionTimestamp;
}

/** @var string */
private $sessionTimeout = '';

/**
* @return string
*/
public function getSessionTimeout(): string
{
return $this->sessionTimeout;
}

/**
* @param string $sessionTimeout
*/
public function setSessionTimeout(string $sessionTimeout): void
{
$this->sessionTimeout = $sessionTimeout;
}

/** @var string */
private $companyId = '';

Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Credentials/CredentialsInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Credentials/Endpoint.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Credentials/LoginCredentials.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Credentials/ProfileCredentialProvider.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Credentials/SenderCredentials.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Credentials/SessionCredentials.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Exception/IntacctException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Exception/ResponseException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Exception/ResultException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
2 changes: 1 addition & 1 deletion src/Intacct/Functions/AbstractFunction.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Copyright 2020 Sage Intacct, Inc.
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

/**
* Copyright 2021 Sage Intacct, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "LICENSE" file accompanying this file. This file is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

namespace Intacct\Functions\AccountsPayable;

use Intacct\Xml\XMLWriter;

abstract class AbstractApPaymentDetailCredit
{
public const DEBIT_MEMO = 'debit memo';

public const NEGATIVE_BILL = 'negative bill';

public const ADVANCE = 'advance';

/** @var int */
public $recordNo;

/** @var int */
public $lineRecordNo;

/** @var float|int|string */
public $transactionAmount;

/**
* @param XMLWriter $xml
*/
public function writeXml(XMLWriter $xml): void
{
$xml->writeElement($this->getKeyType(), $this->recordNo, true);
if (isset($this->lineRecordNo)) {
$xml->writeElement($this->getEntryKeyType(), $this->lineRecordNo);
}
if (isset($this->transactionAmount)) {
$xml->writeElement($this->getTransactionType(), $this->transactionAmount);
}
}

/** @return string */
abstract protected function getKeyType(): string;

/** @return string */
abstract protected function getEntryKeyType(): string;

/** @return string */
abstract protected function getTransactionType(): string;
}
Loading

0 comments on commit 4a93555

Please sign in to comment.