PortalSession.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. class ChargeBee_PortalSession extends ChargeBee_Model
  3. {
  4. protected $allowed = array('id', 'token', 'accessUrl', 'redirectUrl', 'status', 'createdAt', 'expiresAt',
  5. 'customerId', 'loginAt', 'logoutAt', 'loginIpaddress', 'logoutIpaddress', 'linkedCustomers');
  6. # OPERATIONS
  7. #-----------
  8. public static function create($params, $env = null, $headers = array())
  9. {
  10. return ChargeBee_Request::send(ChargeBee_Request::POST, ChargeBee_Util::encodeURIPath("portal_sessions"), $params, $env, $headers);
  11. }
  12. public static function retrieve($id, $env = null, $headers = array())
  13. {
  14. return ChargeBee_Request::send(ChargeBee_Request::GET, ChargeBee_Util::encodeURIPath("portal_sessions",$id), array(), $env, $headers);
  15. }
  16. public static function logout($id, $env = null, $headers = array())
  17. {
  18. return ChargeBee_Request::send(ChargeBee_Request::POST, ChargeBee_Util::encodeURIPath("portal_sessions",$id,"logout"), array(), $env, $headers);
  19. }
  20. public static function activate($id, $params, $env = null, $headers = array())
  21. {
  22. return ChargeBee_Request::send(ChargeBee_Request::POST, ChargeBee_Util::encodeURIPath("portal_sessions",$id,"activate"), $params, $env, $headers);
  23. }
  24. }
  25. ?>