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 \Mollie\Api\Resources\PaymentCollection */ protected function getResourceCollectionObject($count, $_links) { return new PaymentCollection($this->client, $count, $_links); } /** * Creates a payment in Mollie for a specific order. * * @param \Mollie\Api\Resources\Order $order * @param array $data An array containing details on the order payment. * @param array $filters * * @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createFor(Order $order, array $data, array $filters = []) { return $this->createForId($order->id, $data, $filters); } /** * Creates a payment in Mollie for a specific order ID. * * @param string $orderId * @param array $data An array containing details on the order payment. * @param array $filters * * @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createForId($orderId, array $data, array $filters = []) { $this->parentId = $orderId; return $this->rest_create($data, $filters); } }