customerId = $customerId; $this->subscriptionId = $subscriptionId; return $this->rest_list($from, $limit, $parameters); } /** * Get the object that is used by this API endpoint. Every API endpoint uses one type of object. * * @return Payment */ protected function getResourceObject() { return new \Mollie\Api\Resources\Payment($this->client); } /** * Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object. * * @param int $count * @param \stdClass $_links * * @return PaymentCollection */ protected function getResourceCollectionObject($count, $_links) { return new \Mollie\Api\Resources\PaymentCollection($this->client, $count, $_links); } public function getResourcePath() { if (\is_null($this->customerId)) { throw new \Mollie\Api\Exceptions\ApiException('No customerId provided.'); } if (\is_null($this->subscriptionId)) { throw new \Mollie\Api\Exceptions\ApiException('No subscriptionId provided.'); } return "customers/{$this->customerId}/subscriptions/{$this->subscriptionId}/payments"; } }