| 1 | <?php |
||
| 7 | class CampaignClient extends BaseClient |
||
| 8 | { |
||
| 9 | protected $aliases = [ |
||
| 10 | 'registerFundraisingPage' => 'RegisterCampaignFundraisingPage', |
||
| 11 | 'retrieve' => 'GetCampaignDetails', |
||
| 12 | 'pages' => 'GetPagesForCampaign', |
||
| 13 | 'create' => 'CreateCampaign', |
||
| 14 | 'getAllByCharityId' => 'GetCampaignsByCharityId', |
||
| 15 | ]; |
||
| 16 | |||
| 17 | public function retrieve($charityName, $campaignName) |
||
| 18 | { |
||
| 19 | return $this->get("campaigns/" . $charityName . "/" . $campaignName); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Test context account is not authorised to create a new campaign. |
||
| 24 | * |
||
| 25 | * @codeCoverageIgnore |
||
| 26 | */ |
||
| 27 | public function create(RegisterCampaignRequest $registerCampaignRequest) |
||
| 31 | |||
| 32 | public function pages($charityShortName, $campaignShortUrl) |
||
| 33 | { |
||
| 34 | return $this->get("campaigns/" . $charityShortName . "/" . $campaignShortUrl . "/pages"); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function getAllByCharityId($charityId) |
||
| 38 | { |
||
| 39 | return $this->get('campaigns/' . $charityId); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Test context account is not authorised to create a new campaign. |
||
| 44 | * |
||
| 45 | * @codeCoverageIgnore |
||
| 46 | */ |
||
| 47 | public function registerFundraisingPage($registerCampaignFundraisingPageRequest) |
||
| 51 | } |
||
| 52 |