public function createForId($profileId, $methodId, array $data = [])
    {
        $this->parentId = $profileId;
        $resource = $this->getResourcePath() . '/' . urlencode($methodId);

        $body = null;
        if (count($data) > 0) {
            $body = json_encode($data);
        }

        $result = $this->client->performHttpCall(self::REST_CREATE, $resource, $body);

        return ResourceFactory::createFromApiResult($result, new Method($this->client));
    }
public function createForId($profileId, $methodId, array $data = [])
    {
        $this->parentId = $profileId;
        $resource = $this->getResourcePath() . '/' . urlencode($methodId);

        $body = null;
        if (count($data) > 0) {
            $body = json_encode($data);
        }

        $result = $this->client->performHttpCall(self::REST_CREATE, $resource, $body);

        return ResourceFactory::createFromApiResult($result, new Method($this->client));
    }
public function createForId ( $ profileId , $ methodId , array $ data = [ ] ) { $ this -> parentId = $ profileId ; $ resource = $ this -> getResourcePath ( ) . '/' . urlencode ( $ methodId ) ; $ body = null ; if ( count ( $ data ) > 0 ) { $ body = json_encode ( $ data ) ; } $ result = $ this -> client -> performHttpCall ( self :: REST_CREATE , $ resource , $ body ) ; return ResourceFactory :: createFromApiResult ( $ result , new Method ( $ this -> client ) ) ; }
Enable a method for the provided Profile ID.

@param $profileId
@param $methodId
@param array $data
@return \Mollie\Api\Resources\BaseResource
@throws \Mollie\Api\Exceptions\ApiException
Enable a method for the provided Profile ID .