1 | <?php |
||
8 | class CharityClient extends BaseClient |
||
9 | { |
||
10 | protected $aliases = [ |
||
11 | 'getById' => 'GetCharityById', |
||
12 | 'authenticate' => 'AuthenticateCharityAccount', |
||
13 | 'getEventsByCharityId' => 'GetEventsByCharityId', |
||
14 | 'getDonations' => 'GetCharityDonations', |
||
15 | 'deleteFundraisingPageAttribution' => 'CharityDeleteFundraisingPageAttribution', |
||
16 | 'updateFundraisingPageAttribution' => 'CharityUpdateFundraisingPageAttribution', |
||
17 | 'appendFundraisingPageAttribution' => 'CharityAppendToFundraisingPageAttribution', |
||
18 | 'getFundraisingPageAttribution' => 'CharityGetFundraisingPageAttribution', |
||
19 | 'categories' => 'GetCharityCategories', |
||
20 | ]; |
||
21 | |||
22 | public function getById($charityId) |
||
23 | { |
||
24 | return $this->get("charity/" . $charityId); |
||
25 | } |
||
26 | |||
27 | public function authenticate(AuthenticateCharityAccountRequest $authenticateRequest) |
||
28 | { |
||
29 | return $this->post("charity/authenticate", $authenticateRequest); |
||
30 | } |
||
31 | |||
32 | public function getEventsByCharityId($charityId) |
||
33 | { |
||
34 | return $this->get("charity/" . $charityId . "/events"); |
||
35 | } |
||
36 | |||
37 | public function getDonations($charityId) |
||
38 | { |
||
39 | return $this->get("charity/" . $charityId . "/donations"); |
||
40 | } |
||
41 | |||
42 | // Test account does not have permission to edit charity fundraising pages. |
||
43 | // @codeCoverageIgnoreStart |
||
44 | |||
45 | public function deleteFundraisingPageAttribution($charityId, $pageShortName) |
||
49 | |||
50 | public function updateFundraisingPageAttribution($charityId, $pageShortName, UpdateFundraisingPageAttributionRequest $updateRequest) |
||
54 | |||
55 | public function appendFundraisingPageAttribution($charityId, $pageShortName, UpdateFundraisingPageAttributionRequest $updateRequest) |
||
59 | |||
60 | public function getFundraisingPageAttribution($charityId, $pageShortName) |
||
64 | |||
65 | // @codeCoverageIgnoreEnd |
||
66 | |||
67 | public function categories() |
||
68 | { |
||
71 | } |
||
72 |