You are here

private function Mollie_API_Resource_Base::rest_read in Commerce Mollie 7

Retrieves a single object from the REST API.

Parameters

$rest_resource:

string $id Id of the object to retrieve.:

Return value

object

1 call to Mollie_API_Resource_Base::rest_read()
Mollie_API_Resource_Base::get in Mollie/API/Resource/Base.php
Retrieve information on a single resource from Mollie.

File

Mollie/API/Resource/Base.php, line 85

Class

Mollie_API_Resource_Base
Copyright (c) 2013, Mollie B.V. All rights reserved.

Code

private function rest_read($rest_resource, $id) {
  $id = $id ? urlencode($id) : 'undefined';
  $result = $this
    ->performApiCall(self::REST_READ, "{$rest_resource}/{$id}");
  return $this
    ->copy($result, $this
    ->getResourceObject($rest_resource));
}