1 | <?php |
||
10 | class Xero extends Server |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $responseType = 'xml'; |
||
16 | |||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | protected $usePartnerApi = false; |
||
21 | |||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function __construct($clientCredentials, SignatureInterface $signature = null) |
||
33 | |||
34 | /** |
||
35 | * Sets whether the Xero partner API should be used. |
||
36 | * |
||
37 | * @param bool $enable |
||
38 | * |
||
39 | * @return self |
||
40 | */ |
||
41 | public function usePartnerApi($enable = true) |
||
47 | |||
48 | /** |
||
49 | * Checks if the Xero partner API is used. |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function getUsePartnerApi() |
||
57 | |||
58 | public function urlTemporaryCredentials() |
||
66 | |||
67 | public function urlAuthorization() |
||
71 | |||
72 | public function urlTokenCredentials() |
||
80 | |||
81 | public function urlUserDetails() |
||
85 | |||
86 | public function userDetails($data, TokenCredentials $tokenCredentials) |
||
90 | |||
91 | public function userUid($data, TokenCredentials $tokenCredentials) |
||
95 | |||
96 | public function userEmail($data, TokenCredentials $tokenCredentials) |
||
100 | |||
101 | public function userScreenName($data, TokenCredentials $tokenCredentials) |
||
105 | |||
106 | protected function notSupportedByXero() |
||
110 | |||
111 | /** |
||
112 | * Parse configuration array to set attributes. |
||
113 | * |
||
114 | * @param array $configuration |
||
115 | */ |
||
116 | private function parseConfiguration(array $configuration = array()) |
||
127 | } |
||
128 |