/
home
/
techb158
/
ileadtechnology.com
/
vendor
/
mollie
/
mollie-api-php
/
src
/
Endpoints
/
/home/techb158/ileadtechnology.com/vendor/mollie/mollie-api-php/src/Endpoints
mkdir
upload
Name
Size
Mode
Actions
BalanceEndpoint.php
2353
0644
edit
dl
rm
BalanceReportEndpoint.php
2048
0644
edit
dl
rm
BalanceTransactionEndpoint.php
2086
0644
edit
dl
rm
ChargebackEndpoint.php
1372
0644
edit
dl
rm
ClientEndpoint.php
1810
0644
edit
dl
rm
ClientLinkEndpoint.php
884
0644
edit
dl
rm
CollectionEndpointAbstract.php
1543
0644
edit
dl
rm
CustomerEndpoint.php
3322
0644
edit
dl
rm
CustomerPaymentsEndpoint.php
2773
0644
edit
dl
rm
EndpointAbstract.php
5163
0644
edit
dl
rm
InvoiceEndpoint.php
2064
0644
edit
dl
rm
MandateEndpoint.php
4139
0644
edit
dl
rm
MethodEndpoint.php
3088
0644
edit
dl
rm
OnboardingEndpoint.php
2411
0644
edit
dl
rm
OrderEndpoint.php
3575
0644
edit
dl
rm
OrderLineEndpoint.php
3930
0644
edit
dl
rm
OrderPaymentEndpoint.php
2036
0644
edit
dl
rm
OrderRefundEndpoint.php
1899
0644
edit
dl
rm
OrganizationEndpoint.php
1673
0644
edit
dl
rm
OrganizationPartnerEndpoint.php
1502
0644
edit
dl
rm
PaymentCaptureEndpoint.php
3323
0644
edit
dl
rm
PaymentChargebackEndpoint.php
2404
0644
edit
dl
rm
PaymentEndpoint.php
4815
0644
edit
dl
rm
PaymentLinkEndpoint.php
2447
0644
edit
dl
rm
PaymentRefundEndpoint.php
3203
0644
edit
dl
rm
PaymentRouteEndpoint.php
2142
0644
edit
dl
rm
PermissionEndpoint.php
1608
0644
edit
dl
rm
ProfileEndpoint.php
3841
0644
edit
dl
rm
ProfileMethodEndpoint.php
3578
0644
edit
dl
rm
RefundEndpoint.php
1328
0644
edit
dl
rm
SettlementCaptureEndpoint.php
1139
0644
edit
dl
rm
SettlementChargebackEndpoint.php
1198
0644
edit
dl
rm
SettlementPaymentEndpoint.php
1109
0644
edit
dl
rm
SettlementRefundEndpoint.php
1166
0644
edit
dl
rm
SettlementsEndpoint.php
2294
0644
edit
dl
rm
ShipmentEndpoint.php
4545
0644
edit
dl
rm
SubscriptionEndpoint.php
6095
0644
edit
dl
rm
TerminalEndpoint.php
2055
0644
edit
dl
rm
WalletEndpoint.php
1074
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/vendor/mollie/mollie-api-php/src/Endpoints/EndpointAbstract.php
(5163B)
<?php namespace Mollie\Api\Endpoints; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\MollieApiClient; use Mollie\Api\Resources\BaseResource; use Mollie\Api\Resources\ResourceFactory; abstract class EndpointAbstract { public const REST_CREATE = MollieApiClient::HTTP_POST; public const REST_UPDATE = MollieApiClient::HTTP_PATCH; public const REST_READ = MollieApiClient::HTTP_GET; public const REST_LIST = MollieApiClient::HTTP_GET; public const REST_DELETE = MollieApiClient::HTTP_DELETE; /** * @var MollieApiClient */ protected $client; /** * @var string */ protected $resourcePath; /** * @var string|null */ protected $parentId; /** * @param MollieApiClient $api */ public function __construct(MollieApiClient $api) { $this->client = $api; } /** * @param array $filters * @return string */ protected function buildQueryString(array $filters) { if (empty($filters)) { return ""; } foreach ($filters as $key => $value) { if ($value === true) { $filters[$key] = "true"; } if ($value === false) { $filters[$key] = "false"; } } return "?" . http_build_query($filters, "", "&"); } /** * @param array $body * @param array $filters * @return mixed * @throws ApiException */ protected function rest_create(array $body, array $filters) { $result = $this->client->performHttpCall( self::REST_CREATE, $this->getResourcePath() . $this->buildQueryString($filters), $this->parseRequestBody($body) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Sends a PATCH request to a single Mollie API object. * * @param string $id * @param array $body * * @return mixed * @throws ApiException */ protected function rest_update($id, array $body = []) { if (empty($id)) { throw new ApiException("Invalid resource id."); } $id = urlencode($id); $result = $this->client->performHttpCall( self::REST_UPDATE, "{$this->getResourcePath()}/{$id}", $this->parseRequestBody($body) ); if ($result == null) { return null; } return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Retrieves a single object from the REST API. * * @param string $id Id of the object to retrieve. * @param array $filters * @return mixed * @throws ApiException */ protected function rest_read($id, array $filters) { if (empty($id)) { throw new ApiException("Invalid resource id."); } $id = urlencode($id); $result = $this->client->performHttpCall( self::REST_READ, "{$this->getResourcePath()}/{$id}" . $this->buildQueryString($filters) ); return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Sends a DELETE request to a single Molle API object. * * @param string $id * @param array $body * * @return mixed * @throws ApiException */ protected function rest_delete($id, array $body = []) { if (empty($id)) { throw new ApiException("Invalid resource id."); } $id = urlencode($id); $result = $this->client->performHttpCall( self::REST_DELETE, "{$this->getResourcePath()}/{$id}", $this->parseRequestBody($body) ); if ($result == null) { return null; } return ResourceFactory::createFromApiResult($result, $this->getResourceObject()); } /** * Get the object that is used by this API endpoint. Every API endpoint uses one type of object. * * @return BaseResource */ abstract protected function getResourceObject(); /** * @param string $resourcePath */ public function setResourcePath($resourcePath) { $this->resourcePath = strtolower($resourcePath); } /** * @return string * @throws ApiException */ public function getResourcePath() { if (strpos($this->resourcePath, "_") !== false) { [$parentResource, $childResource] = explode("_", $this->resourcePath, 2); if (empty($this->parentId)) { throw new ApiException("Subresource '{$this->resourcePath}' used without parent '$parentResource' ID."); } return "$parentResource/{$this->parentId}/$childResource"; } return $this->resourcePath; } /** * @param array $body * @return null|string */ protected function parseRequestBody(array $body) { if (empty($body)) { return null; } return @json_encode($body); } }
Save
cmd:
run