コード例 #1
0
 /**
  * Proxy method to implementation.post call
  * @param CheckfrontAPIRequest $request
  * @return array
  */
 public function post(CheckfrontAPIRequest $request)
 {
     return $this->implementation->post($request->getEndpoint(), $request->getData());
 }
コード例 #2
0
 /**
  * Return a unique cache key for the request object so it can be stored and
  * subsequent requests with same paraamters will be served from cache.
  *
  * @param $method - e.g. 'api', 'get', 'post'
  * @param CheckfrontAPIRequest $request
  *
  * @return string
  */
 private static function key($method, CheckfrontAPIRequest $request)
 {
     return md5($method . '|' . $request->getEndpoint() . '|' . json_encode($request->getData()));
 }