Skip to content

Commit

Permalink
Merge pull request #231 from sandervanhooft/add_idempotency
Browse files Browse the repository at this point in the history
Added mollie client idempotency methods
  • Loading branch information
sandervanhooft authored Jul 31, 2023
2 parents 01db016 + e90dfc4 commit d71e476
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ vendor
composer.lock
phpunit.xml
.phpunit.result.cache
.phpunit.cache
.DS_Store
.php-cs-fixer.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
],
"require": {
"php": "^8.0",
"mollie/mollie-api-php": "v2.58.0-beta",
"mollie/mollie-api-php": "^2.60",
"illuminate/support": "^9.0|^10.0",
"ext-json": "*"
},
Expand Down
13 changes: 7 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutOutputDuringTests="true" bootstrap="vendor/autoload.php" colors="true" failOnRisky="true" failOnWarning="true" processIsolation="false" stopOnError="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutOutputDuringTests="true" bootstrap="vendor/autoload.php" colors="true" failOnRisky="true" failOnWarning="true" processIsolation="false" stopOnError="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage/>
<testsuites>
<testsuite name="Laravel Mollie Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
20 changes: 20 additions & 0 deletions src/Wrappers/MollieApiWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,26 @@ public function disableDebugging()
$this->client->disableDebugging();
}

public function setIdempotencyKey(string $key)
{
return $this->client->setIdempotencyKey($key);
}

public function resetIdempotencyKey()
{
return $this->client->resetIdempotencyKey();
}

public function setIdempotencyKeyGenerator($generator)
{
return $this->client->setIdempotencyKeyGenerator($generator);
}

public function clearIdempotencyKeyGenerator()
{
return $this->client->clearIdempotencyKeyGenerator();
}

/**
* Handle dynamic property calls.
*
Expand Down

0 comments on commit d71e476

Please sign in to comment.