We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 089e696 commit 154ae01Copy full SHA for 154ae01
src/XeroFactory.php
@@ -17,6 +17,11 @@ class XeroFactory
17
*/
18
protected $application;
19
20
+ /**
21
+ * @var \Calcinai\OAuth2\Client\XeroTenant[]
22
+ */
23
+ protected $tenants = [];
24
+
25
/**
26
* Setup
27
@@ -37,6 +42,7 @@ public function setupApplication()
37
42
$config->XeroRefreshToken = $refresh;
38
43
}
39
44
45
+ $this->tenants = $provider->getTenants($newAccessToken);
40
46
$config->write();
41
47
48
@@ -74,4 +80,16 @@ public function getRedirectUri()
74
80
'connectXero'
75
81
);
76
82
83
84
85
+ * @return \Calcinai\OAuth2\Client\XeroTenant[]
86
87
+ public function getTenants()
88
+ {
89
+ if (!$this->application) {
90
+ $this->setupApplication();
91
+ }
92
93
+ return $this->tenants;
94
77
95
0 commit comments