-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from Adyen/develop
Release 6.1.0
- Loading branch information
Showing
7 changed files
with
194 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?php | ||
|
||
namespace Adyen\Service; | ||
|
||
use Adyen\Service\ResourceModel\DisputeService\DefendDispute; | ||
use Adyen\Service\ResourceModel\DisputeService\DeleteDisputeDefenseDocument; | ||
use Adyen\Service\ResourceModel\DisputeService\RetrieveApplicableDefenseReasons; | ||
use Adyen\Service\ResourceModel\DisputeService\SupplyDefenseDocument; | ||
|
||
class DisputeService extends \Adyen\Service | ||
{ | ||
/** | ||
* @var \Adyen\Service\ResourceModel\DisputeService\RetrieveApplicableDefenseReasons | ||
*/ | ||
protected $retrieveApplicableDefenseReasons; | ||
|
||
/** | ||
* @var \Adyen\Service\ResourceModel\DisputeService\DeleteDisputeDefenseDocument | ||
*/ | ||
protected $deleteDisputeDefenseDocument; | ||
|
||
/** | ||
* @var \Adyen\Service\ResourceModel\DisputeService\DefendDispute | ||
*/ | ||
protected $defendDispute; | ||
|
||
/** | ||
* @var \Adyen\Service\ResourceModel\DisputeService\SupplyDefenseDocument | ||
*/ | ||
protected $supplyDefenseDocument; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function __construct(\Adyen\Client $client) | ||
{ | ||
parent::__construct($client); | ||
$this->retrieveApplicableDefenseReasons = new RetrieveApplicableDefenseReasons($this); | ||
$this->deleteDisputeDefenseDocument = new DeleteDisputeDefenseDocument($this); | ||
$this->defendDispute = new DefendDispute($this); | ||
$this->supplyDefenseDocument = new SupplyDefenseDocument($this); | ||
} | ||
|
||
/** | ||
* Handler for /retrieveApplicableDefenseReasons endpoint | ||
* | ||
* @param array $params | ||
* | ||
* @return mixed | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function retrieveApplicableDefenseReasons($params) | ||
{ | ||
return $this->retrieveApplicableDefenseReasons->request($params); | ||
} | ||
|
||
/** | ||
* Handler for /supplyDefenseDocument endpoint | ||
* | ||
* @param array $params | ||
* | ||
* @return mixed | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function supplyDefenseDocument($params) | ||
{ | ||
return $this->supplyDefenseDocument->request($params); | ||
} | ||
|
||
/** | ||
* Handler for /deleteDisputeDefenseDocument endpoint | ||
* | ||
* @param array $params | ||
* | ||
* @return mixed | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function deleteDisputeDefenseDocument($params) | ||
{ | ||
return $this->deleteDisputeDefenseDocument->request($params); | ||
} | ||
|
||
/** | ||
* Handler for /defendDispute endpoint | ||
* | ||
* @param array $params | ||
* | ||
* @return mixed | ||
* @throws \Adyen\AdyenException | ||
*/ | ||
public function defendDispute($params) | ||
{ | ||
return $this->defendDispute->request($params); | ||
} | ||
|
||
/** | ||
* Get the service resource endpoint URL | ||
* | ||
* @param string $endpoint | ||
* | ||
* @return string | ||
*/ | ||
public function getResourceURL($endpoint) | ||
{ | ||
return $this->getClient()->getConfig()->get('endpointDisputeService') . '/' . $this->getClient()->getDisputeServiceVersion() . '/' . $endpoint; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Adyen/Service/ResourceModel/DisputeService/DefendDispute.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\DisputeService; | ||
|
||
use Adyen\Service\AbstractResource; | ||
|
||
class DefendDispute extends AbstractResource | ||
{ | ||
/** | ||
* DefendDispute constructor. | ||
* | ||
* @param \Adyen\Service\DisputeService $service | ||
*/ | ||
public function __construct($service) { | ||
parent::__construct($service, $service->getResourceURL('defendDispute')); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Adyen/Service/ResourceModel/DisputeService/DeleteDisputeDefenseDocument.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\DisputeService; | ||
|
||
use Adyen\Service\AbstractResource; | ||
|
||
class DeleteDisputeDefenseDocument extends AbstractResource | ||
{ | ||
/** | ||
* DeleteDisputeDefenseDocument constructor. | ||
* | ||
* @param \Adyen\Service\DisputeService $service | ||
*/ | ||
public function __construct($service) { | ||
parent::__construct($service, $service->getResourceURL('deleteDisputeDefenseDocument')); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Adyen/Service/ResourceModel/DisputeService/RetrieveApplicableDefenseReasons.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\DisputeService; | ||
|
||
use Adyen\Service\AbstractResource; | ||
|
||
class RetrieveApplicableDefenseReasons extends AbstractResource | ||
{ | ||
/** | ||
* RetrieveApplicableDefenseReasons constructor. | ||
* | ||
* @param \Adyen\Service\DisputeService $service | ||
*/ | ||
public function __construct($service) { | ||
parent::__construct($service, $service->getResourceURL('retrieveApplicableDefenseReasons')); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Adyen/Service/ResourceModel/DisputeService/SupplyDefenseDocument.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Adyen\Service\ResourceModel\DisputeService; | ||
|
||
use Adyen\Service\AbstractResource; | ||
|
||
class SupplyDefenseDocument extends AbstractResource | ||
{ | ||
/** | ||
* SupplyDefenseDocument constructor. | ||
* | ||
* @param \Adyen\Service\DisputeService $service | ||
*/ | ||
public function __construct($service) { | ||
parent::__construct($service, $service->getResourceURL('supplyDefenseDocument')); | ||
} | ||
} |