/home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources
Edit: /home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources/Settlement.php (4602B)
status === SettlementStatus::STATUS_OPEN;
}
/**
* Is this settlement pending?
*
* @return bool
*/
public function isPending()
{
return $this->status === SettlementStatus::STATUS_PENDING;
}
/**
* Is this settlement paidout?
*
* @return bool
*/
public function isPaidout()
{
return $this->status === SettlementStatus::STATUS_PAIDOUT;
}
/**
* Is this settlement failed?
*
* @return bool
*/
public function isFailed()
{
return $this->status === SettlementStatus::STATUS_FAILED;
}
/**
* Retrieves all payments associated with this settlement
*
* @param null $limit
* @param array $parameters
* @return PaymentCollection
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function payments($limit = null, array $parameters = [])
{
return $this->client->settlementPayments->pageForId($this->id, null, $limit, $parameters);
}
/**
* Retrieves all refunds associated with this settlement
*
* @return RefundCollection
* @throws ApiException
*/
public function refunds()
{
if (! isset($this->_links->refunds->href)) {
return new RefundCollection($this->client, 0, null);
}
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href);
return ResourceFactory::createCursorResourceCollection(
$this->client,
$result->_embedded->refunds,
Refund::class,
$result->_links
);
}
/**
* Retrieves all chargebacks associated with this settlement
*
* @return ChargebackCollection
* @throws ApiException
*/
public function chargebacks()
{
if (! isset($this->_links->chargebacks->href)) {
return new ChargebackCollection($this->client, 0, null);
}
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->chargebacks->href);
return ResourceFactory::createCursorResourceCollection(
$this->client,
$result->_embedded->chargebacks,
Chargeback::class,
$result->_links
);
}
/**
* Retrieves all captures associated with this settlement
*
* @return CaptureCollection
* @throws ApiException
*/
public function captures()
{
if (! isset($this->_links->captures->href)) {
return new CaptureCollection($this->client, 0, null);
}
$result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->captures->href);
return ResourceFactory::createCursorResourceCollection(
$this->client,
$result->_embedded->captures,
Capture::class,
$result->_links
);
}
}