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

Update to Latest #1

Merged
merged 39 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2e6aed8
init: quote model
Apr 25, 2020
f1e96e2
chore: add pdf trait to quote model
Apr 25, 2020
7ebd5ac
add line-item class to accounting namespace; deprecate old classes
May 9, 2020
6fdbe28
Merge branch 'master' of github.com:calcinai/xero-php into feature/qu…
May 9, 2020
5fc5f71
chore: use correct line item class in models
May 9, 2020
ae586bd
chore: remove version constraint from line item deprecation notices
Jun 3, 2020
bff9c63
Merge branch 'master' of github.com:calcinai/xero-php into line-items…
Jun 3, 2020
98ec848
Throw ForbiddenException on STATUS_FORBIDDEN
gurubobnz Jun 14, 2020
3691e52
Update Query.php
Healyhatman Jul 13, 2020
359516e
Merge pull request #750 from Healyhatman/patch-14
calcinai Jul 13, 2020
88f1942
Merge pull request #745 from gurubobnz/patch-1
calcinai Jul 16, 2020
e02006b
Merge pull request #738 from mikerockett/line-items-cleanup
calcinai Jul 16, 2020
4d98bb5
Lower PHP requirement
calcinai Jul 17, 2020
784c7f3
Merge branch 'master' of github.com:calcinai/xero-php into feature/qu…
Jul 17, 2020
7c7988c
chore: update quote to use common line-item class
Jul 17, 2020
a336dbe
chore: remove line-amount-types from quote class
Jul 17, 2020
cc223c3
Fix PHP5.5 compat
calcinai Jul 19, 2020
8aee18b
docs: update webhook readme docs
atymic Jul 30, 2020
faa58bb
Merge pull request #758 from atymic/docs/webhook-docs
calcinai Jul 30, 2020
c4abac7
Fixed issue in README OAuth2 example
mrstebo Aug 2, 2020
b88e3d2
Add Particulars, Code, Reference property
Sep 8, 2020
cda24b1
Bump Guzzle and PSR7 versions
securit Sep 11, 2020
36ad7fe
Merge pull request #765 from securit/master
calcinai Sep 16, 2020
4e06a8f
Merge pull request #764 from michgeek/master
calcinai Sep 16, 2020
6b67534
Merge pull request #759 from mrstebo/patch-1
calcinai Sep 16, 2020
78bebcd
Fix for Settings element not Parsing
Healyhatman Sep 22, 2020
fad90ef
Delete Account.php
Healyhatman Sep 22, 2020
fa11ee9
Update TrackingCategory.php
Healyhatman Sep 22, 2020
b9283e7
Revert "Delete Account.php"
Healyhatman Sep 22, 2020
e474b3e
Merge pull request #766 from Healyhatman/patch-16
calcinai Sep 22, 2020
7207cb1
Merge pull request #756 from mikerockett/feature/quotes-api-implement…
calcinai Sep 22, 2020
1ac1ba8
Fix for Tracking Category in settings
Healyhatman Sep 24, 2020
057502c
Merge pull request #767 from Healyhatman/AU-tracking-cat-settings
calcinai Sep 25, 2020
6f4f068
Update PayTemplate.php
Healyhatman Sep 29, 2020
5fe53b6
Merge pull request #769 from Healyhatman/payroll-au-template-array-fix
calcinai Sep 29, 2020
cd28092
Update Pay Template Line properties
Healyhatman Oct 1, 2020
498c382
Merge pull request #770 from Healyhatman/payrollau-deduction-types
calcinai Oct 1, 2020
9648a25
fix: Payments are now pageable #772
gurucomkz Oct 6, 2020
90b378c
Merge pull request #773 from gurucomkz/gurucomkz-patch-issue-772
calcinai Oct 6, 2020
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ OAuth scopes, indicating which parts of the Xero organisation you'd like your ap
found [here](https://developer.xero.com/documentation/oauth2/scopes).

```php
$authUrl = $provider->$provider->getAuthorizationUrl([
'scope' => 'bankfeeds accounting.transactions'
$authUrl = $provider->getAuthorizationUrl([
'scope' => 'bankfeeds accounting.transactions'
]);
```

Expand Down Expand Up @@ -207,6 +207,8 @@ Refer to the [examples](examples) for more complex usage and nested/related obje
If you are receiving webhooks from Xero there is `Webhook` class that can help with handling the request and parsing the associated event list.

```php
// Configure the webhook signing key on the application
$application->setConfig(['webhook' => ['signing_key' => 'xyz123']]);
$webhook = new Webhook($application, $request->getContent());

/**
Expand All @@ -229,7 +231,7 @@ See: [Webhooks documentation](https://developer.xero.com/documentation/webhooks/

### Validating Webhooks

To ensure the webhooks are coming from Xero you should validate the incoming request header that Xero provides.
To ensure the webhooks are coming from Xero you must validate the incoming request header that Xero provides.

```php
if (! $webhook->validate($request->headers->get('x-xero-signature'))) {
Expand Down
54 changes: 29 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
{
"name": "calcinai/xero-php",
"type": "library",
"description": "A client implementation of the Xero API, with a cleaner OAuth interface and ORM-like abstraction.",
"homepage": "https://github.com/calcinai/xero-php",
"license": "MIT",
"require": {
"php": ">=5.6.0",
"calcinai/oauth2-xero": "^1.0",
"guzzlehttp/guzzle": "^6.5",
"guzzlehttp/psr7": "^1.5",
"ext-json": "*",
"ext-simplexml": "*"
},
"require-dev": {
"phpunit/phpunit": "^5"
},
"autoload": {
"psr-4": {
"XeroPHP\\": "src/XeroPHP/"
}
"name": "calcinai/xero-php",
"type": "library",
"description": "A client implementation of the Xero API, with a cleaner OAuth interface and ORM-like abstraction.",
"homepage": "https://github.com/calcinai/xero-php",
"license": "MIT",
"require": {
"php": ">=5.5.0",
"calcinai/oauth2-xero": "^1.0",
"guzzlehttp/guzzle": "^6.5|^7.0",
"guzzlehttp/psr7": "^1.5|^1.6",
"ext-json": "*",
"ext-simplexml": "*"
},
"autoload-dev": {
"psr-4": {
"XeroPHP\\Tests\\": "tests/"
}
}
"require-dev": {
"phpunit/phpunit": "^5"
},
"suggest": {
"ext-fileinfo": "*",
"ext-mbstring": "*"
},
"autoload": {
"psr-4": {
"XeroPHP\\": "src/XeroPHP/"
}
},
"autoload-dev": {
"psr-4": {
"XeroPHP\\Tests\\": "tests/"
}
}
}
4 changes: 2 additions & 2 deletions src/XeroPHP/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
class Helpers
{
const PACKAGE_NAME = 'calcinai/xero-php';
const PACKAGE_VERSION_FILE = __DIR__ . '/VERSION';
const DEFAULT_VERSION = 'v2.0.0';
const PACKAGE_VERSION_FILE = '/VERSION';
const DEFAULT_VERSION = 'v2.2.1';

/**
* Convert a multi-d assoc array into an xml representation.
Expand Down
4 changes: 2 additions & 2 deletions src/XeroPHP/Models/Accounting/BankTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use XeroPHP\Remote;
use XeroPHP\Traits\HistoryTrait;
use XeroPHP\Traits\AttachmentTrait;
use XeroPHP\Models\Accounting\BankTransaction\LineItem;
use XeroPHP\Models\Accounting\LineItem;
use XeroPHP\Models\Accounting\BankTransaction\BankAccount;

class BankTransaction extends Remote\Model
Expand Down Expand Up @@ -226,7 +226,7 @@ public static function getProperties()
return [
'Type' => [true, self::PROPERTY_TYPE_ENUM, null, false, false],
'Contact' => [true, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Contact', false, false],
'LineItems' => [true, self::PROPERTY_TYPE_OBJECT, 'Accounting\\BankTransaction\\LineItem', true, false],
'LineItems' => [true, self::PROPERTY_TYPE_OBJECT, 'Accounting\\LineItem', true, false],
'BankAccount' => [true, self::PROPERTY_TYPE_OBJECT, 'Accounting\\BankTransaction\\BankAccount', false, false],
'IsReconciled' => [false, self::PROPERTY_TYPE_BOOLEAN, null, false, false],
'Date' => [false, self::PROPERTY_TYPE_DATE, '\\DateTimeInterface', false, false],
Expand Down
Loading