1 | <?php |
||
11 | class FundraisingClient extends BaseClient |
||
12 | { |
||
13 | protected $aliases = [ |
||
14 | 'urlCheck' => 'FundraisingPageUrlCheck', |
||
15 | 'suggestShortNames' => 'SuggestPageShortNames', |
||
16 | 'register' => 'RegisterFundraisingPage', |
||
17 | 'getByShortName' => 'GetFundraisingPageDetails', |
||
18 | 'getAllPages' => 'GetFundraisingPages', |
||
19 | 'getDonations' => 'GetFundraisingPageDonations', |
||
20 | 'getUpdates' => 'PageUpdates', |
||
21 | 'getUpdatesById' => 'PageUpdateById', |
||
22 | 'addPostToPageUpdate' => 'PageUpdatesAddPost', |
||
23 | 'deletePageUpdate' => 'DeleteFundraisingPageUpdates', |
||
24 | 'deleteAttribution' => 'DeleteFundraisingPageAttribution', |
||
25 | 'updateAttribution' => 'UpdateFundraisingPageAttribution', |
||
26 | 'appendToAttribution' => 'AppendToFundraisingPageAttribution', |
||
27 | 'getAttribution' => 'GetFundraisingPageAttribution', |
||
28 | 'uploadImage' => 'UploadImage', |
||
29 | 'uploadDefaultImage' => 'UploadDefaultImage', |
||
30 | 'addImage' => 'AddImageToFundraisingPage', |
||
31 | 'getImages' => 'GetImagesForFundraisingPage', |
||
32 | 'addVideo' => 'AddVideoToFundraisingPage', |
||
33 | 'getVideos' => 'GetVideosForFundraisingPage', |
||
34 | 'cancel' => 'CancelFundraisingPage', |
||
35 | ]; |
||
36 | |||
37 | 2 | public function urlCheck($pageShortName) |
|
41 | |||
42 | 1 | public function suggestShortNames($preferredName) |
|
46 | |||
47 | 7 | public function register(FundraisingPage $pageCreationRequest) |
|
51 | |||
52 | 2 | public function getByShortName($pageShortName) |
|
56 | |||
57 | 1 | public function getAllPages() |
|
61 | |||
62 | 1 | public function getDonations($pageShortName, $pageSize = 50, $pageNumber = 0) |
|
63 | { |
||
64 | 1 | return $this->get("fundraising/pages/" . $pageShortName . "/donations" . "?PageSize=" . $pageSize . "&PageNum=" . $pageNumber); |
|
65 | } |
||
66 | |||
67 | /** |
||
68 | * Cannot find any test donations with a third party reference. |
||
69 | * |
||
70 | * @codeCoverageIgnore |
||
71 | */ |
||
72 | public function getDonationsByReference($pageShortName, $reference) |
||
76 | |||
77 | 1 | public function UpdateStory($pageShortName, $storyUpdate) |
|
84 | |||
85 | 1 | public function getUpdates($pageShortName) |
|
89 | |||
90 | 1 | public function getUpdatesById($pageShortName, $updateId) |
|
94 | |||
95 | 2 | public function addPostToPageUpdate($pageShortName, $addPostToPageUpdateRequest) |
|
99 | |||
100 | 1 | public function deletePageUpdate($pageShortName, $updateId) |
|
101 | { |
||
102 | 1 | return $this->delete("fundraising/pages/" . $pageShortName . "/updates/" . $updateId); |
|
103 | } |
||
104 | |||
105 | 1 | public function deleteAttribution($pageShortName) |
|
109 | |||
110 | 3 | public function updateAttribution($pageShortName, UpdateFundraisingPageAttributionRequest $updateAttributionRequest) |
|
114 | |||
115 | 1 | public function appendToAttribution($pageShortName, $appendToAttributionRequest) |
|
119 | |||
120 | 3 | public function getAttribution($pageShortName) |
|
124 | |||
125 | 1 | public function uploadImage($pageShortName, $caption, $filename, $imageContentType = null) |
|
131 | |||
132 | 1 | public function uploadDefaultImage($pageShortName, $filename, $imageContentType = null) |
|
138 | |||
139 | 2 | public function addImage($pageShortName, AddImageRequest $addImageRequest) |
|
143 | |||
144 | 2 | public function getImages($pageShortName) |
|
148 | |||
149 | 1 | public function deleteImage($pageShortName, $imageName) |
|
150 | { |
||
151 | 1 | return $this->delete("fundraising/pages/" . $pageShortName . "/images/" . $imageName); |
|
152 | } |
||
153 | |||
154 | 1 | public function addVideo($pageShortName, AddVideoRequest $addVideoRequest) |
|
158 | |||
159 | 1 | public function getVideos($pageShortName) |
|
163 | |||
164 | 1 | public function cancel($pageShortName) |
|
168 | } |
||
169 |