Skip to content

Commit

Permalink
mollie api update
Browse files Browse the repository at this point in the history
  • Loading branch information
liedekef committed Dec 23, 2024
1 parent 3cf17dc commit 0b1fb13
Show file tree
Hide file tree
Showing 18 changed files with 431 additions and 40 deletions.
6 changes: 3 additions & 3 deletions payment_gateways/Mollie/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion payment_gateways/Mollie/vendor/composer/ca-bundle/res/cacert.pem
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Tue Sep 24 03:12:04 2024 GMT
## Certificate data from Mozilla as of: Tue Nov 26 13:58:25 2024 GMT
##
## Find updated versions here: https://curl.se/docs/caextract.html
##
Expand Down Expand Up @@ -2602,6 +2602,36 @@ vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+
CAezNIm8BZ/3Hobui3A=
-----END CERTIFICATE-----

GLOBALTRUST 2020
================
-----BEGIN CERTIFICATE-----
MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx
IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT
VCAyMDIwMB4XDTIwMDIxMDAwMDAwMFoXDTQwMDYxMDAwMDAwMFowTTELMAkGA1UEBhMCQVQxIzAh
BgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVTVCAy
MDIwMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAri5WrRsc7/aVj6B3GyvTY4+ETUWi
D59bRatZe1E0+eyLinjF3WuvvcTfk0Uev5E4C64OFudBc/jbu9G4UeDLgztzOG53ig9ZYybNpyrO
VPu44sB8R85gfD+yc/LAGbaKkoc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4tdJP7wry+UUTF72glJ4DjyKDUEuzZpTcdN3y0kcra1LGWge9oXHYQSa9+pTeAsRxS
vTOBTI/53WXZFM2KJVj04sWDpQmQ1GwUY7VA3+vA/MRYfg0UFodUJ25W5HCEuGwyEn6CMUO+1918
oa2u1qsgEu8KwxCMSZY13At1XrFP1U80DhEgB3VDRemjEdqso5nCtnkn4rnvyOL2NSl6dPrFf4IF
YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl
gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
-----END CERTIFICATE-----

ANF Secure Server Root CA
=========================
-----BEGIN CERTIFICATE-----
Expand Down
28 changes: 14 additions & 14 deletions payment_gateways/Mollie/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"packages": [
{
"name": "composer/ca-bundle",
"version": "1.5.3",
"version_normalized": "1.5.3.0",
"version": "1.5.4",
"version_normalized": "1.5.4.0",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2"
"reference": "bc0593537a463e55cadf45fd938d23b75095b7e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/3b1fc3f0be055baa7c6258b1467849c3e8204eb2",
"reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/bc0593537a463e55cadf45fd938d23b75095b7e1",
"reference": "bc0593537a463e55cadf45fd938d23b75095b7e1",
"shasum": ""
},
"require": {
Expand All @@ -26,7 +26,7 @@
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"time": "2024-11-04T10:15:26+00:00",
"time": "2024-11-27T15:35:25+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -61,7 +61,7 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues",
"source": "https://github.com/composer/ca-bundle/tree/1.5.3"
"source": "https://github.com/composer/ca-bundle/tree/1.5.4"
},
"funding": [
{
Expand All @@ -81,17 +81,17 @@
},
{
"name": "mollie/mollie-api-php",
"version": "v2.75.0",
"version_normalized": "2.75.0.0",
"version": "v2.76.0",
"version_normalized": "2.76.0.0",
"source": {
"type": "git",
"url": "https://github.com/mollie/mollie-api-php.git",
"reference": "ac2052855c631b90092768cf6657f6d5b2f5dd9f"
"reference": "b6e9848e4893d1d306fba54da3ac6f4a31a40368"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/ac2052855c631b90092768cf6657f6d5b2f5dd9f",
"reference": "ac2052855c631b90092768cf6657f6d5b2f5dd9f",
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/b6e9848e4893d1d306fba54da3ac6f4a31a40368",
"reference": "b6e9848e4893d1d306fba54da3ac6f4a31a40368",
"shasum": ""
},
"require": {
Expand All @@ -111,7 +111,7 @@
"suggest": {
"mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://docs.mollie.com/ for more information."
},
"time": "2024-11-21T10:33:16+00:00",
"time": "2024-12-18T12:26:03+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -170,7 +170,7 @@
],
"support": {
"issues": "https://github.com/mollie/mollie-api-php/issues",
"source": "https://github.com/mollie/mollie-api-php/tree/v2.75.0"
"source": "https://github.com/mollie/mollie-api-php/tree/v2.76.0"
},
"install-path": "../mollie/mollie-api-php"
}
Expand Down
16 changes: 8 additions & 8 deletions payment_gateways/Mollie/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '46266ead4d34e752764dd04459243295b6b66e3d',
'reference' => 'cfb95a96a74436f4147401a4a768e4fc72d8c1c0',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,25 +13,25 @@
'__root__' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '46266ead4d34e752764dd04459243295b6b66e3d',
'reference' => 'cfb95a96a74436f4147401a4a768e4fc72d8c1c0',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'composer/ca-bundle' => array(
'pretty_version' => '1.5.3',
'version' => '1.5.3.0',
'reference' => '3b1fc3f0be055baa7c6258b1467849c3e8204eb2',
'pretty_version' => '1.5.4',
'version' => '1.5.4.0',
'reference' => 'bc0593537a463e55cadf45fd938d23b75095b7e1',
'type' => 'library',
'install_path' => __DIR__ . '/./ca-bundle',
'aliases' => array(),
'dev_requirement' => false,
),
'mollie/mollie-api-php' => array(
'pretty_version' => 'v2.75.0',
'version' => '2.75.0.0',
'reference' => 'ac2052855c631b90092768cf6657f6d5b2f5dd9f',
'pretty_version' => 'v2.76.0',
'version' => '2.76.0.0',
'reference' => 'b6e9848e4893d1d306fba54da3ac6f4a31a40368',
'type' => 'library',
'install_path' => __DIR__ . '/../mollie/mollie-api-php',
'aliases' => array(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ protected function getResourceObject()
return new Payment($this->client);
}

public function pageForId(string $paymentLinkId, string $from = null, int $limit = null, array $filters = [])
public function pageForId(string $paymentLinkId, ?string $from = null, ?int $limit = null, array $filters = [])
{
$this->parentId = $paymentLinkId;

return $this->rest_list($from, $limit, $filters);
}

public function pageFor(PaymentLink $paymentLink, string $from = null, int $limit = null, array $filters = [])
public function pageFor(PaymentLink $paymentLink, ?string $from = null, ?int $limit = null, array $filters = [])
{
return $this->pageForId($paymentLink->id, $from, $limit, $filters);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?php

namespace Mollie\Api\Endpoints;

use Mollie\Api\Exceptions\ApiException;
use Mollie\Api\Resources\LazyCollection;
use Mollie\Api\Resources\SalesInvoice;
use Mollie\Api\Resources\SalesInvoiceCollection;

class SalesInvoiceEndpoint extends CollectionEndpointAbstract
{
protected $resourcePath = "sales-invoices";

/**
* @var string
*/
public const RESOURCE_ID_PREFIX = 'invoice_';

/**
* @return SalesInvoice
*/
protected function getResourceObject(): SalesInvoice
{
return new SalesInvoice($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 SalesInvoiceCollection
*/
protected function getResourceCollectionObject($count, $_links): SalesInvoiceCollection
{
return new SalesInvoiceCollection($this->client, $count, $_links);
}

/**
* Creates a payment in Mollie.
*
* @param array $data An array containing details on the payment.
*
* @return SalesInvoice
* @throws ApiException
*/
public function create(array $data = []): SalesInvoice
{
return $this->rest_create($data, []);
}

/**
* Update the given Payment.
*
* Will throw a ApiException if the payment id is invalid or the resource cannot be found.
*
* @param string $salesInvoiceId
*
* @param array $data
* @return SalesInvoice
* @throws ApiException
*/
public function update($salesInvoiceId, array $data = []): SalesInvoice
{
if (empty($salesInvoiceId) || strpos($salesInvoiceId, self::RESOURCE_ID_PREFIX) !== 0) {
throw new ApiException("Invalid sales invoice ID: '{$salesInvoiceId}'. A sales invoice ID should start with '" . self::RESOURCE_ID_PREFIX . "'.");
}

return parent::rest_update($salesInvoiceId, $data);
}

/**
* @param string $salesInvoiceId
* @param array $parameters
* @return SalesInvoice
* @throws ApiException
*/
public function get($salesInvoiceId, array $parameters = []): SalesInvoice
{
if (empty($salesInvoiceId) || strpos($salesInvoiceId, self::RESOURCE_ID_PREFIX) !== 0) {
throw new ApiException("Invalid sales invoice ID: '{$salesInvoiceId}'. A sales invoice ID should start with '" . self::RESOURCE_ID_PREFIX . "'.");
}

return parent::rest_read($salesInvoiceId, $parameters);
}

/**
* @param string $salesInvoiceId
*
* @param array $data
* @throws ApiException
*/
public function delete($salesInvoiceId, array $data = []): void
{
$this->rest_delete($salesInvoiceId, $data);
}

/**
* @param string $from The first payment ID you want to include in your list.
* @param int $limit
*
* @return SalesInvoiceCollection
* @throws ApiException
*/
public function page($from = null, $limit = null)
{
return $this->rest_list($from, $limit, []);
}

/**
* @param string $from The first resource ID you want to include in your list.
* @param int $limit
* @param bool $iterateBackwards Set to true for reverse order iteration (default is false).
*
* @return LazyCollection
*/
public function iterator(?string $from = null, ?int $limit = null, bool $iterateBackwards = false): LazyCollection
{
return $this->rest_iterator($from, $limit, [], $iterateBackwards);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function getResourceCollectionObject($count, $_links)
* @return mixed
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = [])
public function pageForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [])
{
$this->parentId = $settlementId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function getResourceCollectionObject($count, $_links)
* @return mixed
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = [])
public function pageForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [])
{
$this->parentId = $settlementId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function getResourceObject()
* @return mixed
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = [])
public function pageForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = [])
{
$this->parentId = $settlementId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ private function newRetryDecider()
return function (
$retries,
Request $request,
Response $response = null,
TransferException $exception = null
?Response $response = null,
?TransferException $exception = null
) {
if ($retries >= static::MAX_RETRIES) {
return false;
Expand Down
Loading

0 comments on commit 0b1fb13

Please sign in to comment.