Organizations.php 926 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Cloudflare;
  3. /**
  4. * CloudFlare API wrapper
  5. *
  6. * Organizations
  7. *
  8. * @author James Bell <james@james-bell.co.uk>
  9. *
  10. * @version 1
  11. */
  12. class Organizations extends Api
  13. {
  14. /**
  15. * Organization details (permission needed: #organization:read)
  16. * Get information about a specific organization that you are a member of
  17. *
  18. * @param string $identifier
  19. */
  20. public function organization($identifier)
  21. {
  22. return $this->get('/organizations/'.$identifier);
  23. }
  24. /**
  25. * Update organization (permission needed: #organization:edit)
  26. * Update an existing Organization
  27. *
  28. * @param string|null $identifier
  29. * @param string|null $name Organization Name
  30. */
  31. public function update($identifier = null, $name = null)
  32. {
  33. $data = [
  34. 'name' => $name,
  35. ];
  36. return $this->get('/organizations/'.$identifier, $data);
  37. }
  38. }