original_string: public function checkOut(User $user, Library $library, $circ_desk = 'DEFAULT_CIRC_DESK')
      {
          $postData = [
              'library'   => ['value' => $library->code],
              'circ_desk' => ['value' => $circ_desk],
          ];
  
          $data = $this->client->postJSON(
              $this->url('/loans', ['user_id' => $user->id]),
              $postData
          );
  
          return Loan::make($this->client, $user, $data->loan_id)
              ->init($data);
      }
code: public function checkOut(User $user, Library $library, $circ_desk = 'DEFAULT_CIRC_DESK')
      {
          $postData = [
              'library'   => ['value' => $library->code],
              'circ_desk' => ['value' => $circ_desk],
          ];
  
          $data = $this->client->postJSON(
              $this->url('/loans', ['user_id' => $user->id]),
              $postData
          );
  
          return Loan::make($this->client, $user, $data->loan_id)
              ->init($data);
      }
code_tokens: public function checkOut ( User $ user , Library $ library , $ circ_desk = 'DEFAULT_CIRC_DESK' ) { $ postData = [ 'library' => [ 'value' => $ library -> code ] , 'circ_desk' => [ 'value' => $ circ_desk ] , ] ; $ data = $ this -> client -> postJSON ( $ this -> url ( '/loans' , [ 'user_id' => $ user -> id ] ) , $ postData ) ; return Loan :: make ( $ this -> client , $ user , $ data -> loan_id ) -> init ( $ data ) ; }
docstring: Create a new loan.
  
  @param User    $user
  @param Library $library
  @param string  $circ_desk
  
  @throws \Scriptotek\Alma\Exception\RequestFailed
  
  @return Loan
docstring_tokens: Create a new loan .