Skip to content

Commit

Permalink
Added mollie client idempotency methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sandervanhooft committed Jul 31, 2023
1 parent 61df75d commit d8e8ed4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":[],"times":{"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testIsAFacade":0.038,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testFacadeAccessor":0.001,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testFacadeRoot":0.002,"Mollie\\Laravel\\Tests\\Facades\\MollieTest::testServiceProvider":0.002,"Mollie\\Laravel\\Tests\\HelpersTest::testItCanWorkWithHelper":0.028,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testRedirectGeneratesTheProperSymfonyRedirectResponse":0.025,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testExceptionIsThrownIfStateIsInvalid":0.004,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testExceptionIsThrownIfStateIsNotSet":0,"Mollie\\Laravel\\Tests\\MollieConnectProviderTest::testGetTokenFields":0.002,"Mollie\\Laravel\\Tests\\MollieManagerTest::testConstructor":0,"Mollie\\Laravel\\Tests\\MollieManagerTest::testApiMethod":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieManagerIsInjectable":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieApiWrapperIsInjectable":0.001,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testMollieApiClientIsInjectable":0.001,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testIsAServiceProvider":0,"Mollie\\Laravel\\Tests\\MollieServiceProviderTest::testProvides":0.002,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiLaravelClientTest::testPostRequest":0.038,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiLaravelClientTest::testGetRequest":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testConstruct":0.003,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testApiEndpoint":0.013,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetGoodApiKey":0.002,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetBadApiKey":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testDoesNotSetKeyWhenEmpty":0.001,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetGoodToken":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testSetBadToken":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testEnableDebugging":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testDisableDebugging":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testWrappedEndpoints":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testWrappedPropertyEndpoints":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testUnknownWrappedEndpoint":0,"Mollie\\Laravel\\Tests\\Wrappers\\MollieApiWrapperTest::testUnknownWrappedPropertyEndpoint":0}}
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
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 d8e8ed4

Please sign in to comment.