-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/moritzdeissner/paymill-php
Conflicts: tests/integration/SubscriptionTest.php
- Loading branch information
Showing
29 changed files
with
1,034 additions
and
168 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
Binary file not shown.
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,72 @@ | ||
<?php | ||
|
||
namespace Paymill\Models\Request; | ||
|
||
/** | ||
* Fraud Model | ||
* This is an experimental feature! API for frauds may change before being marked as stable for production use. | ||
*/ | ||
class Fraud extends Base | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $identifier = null; | ||
|
||
/** | ||
* Creates an instance of the fraud request model | ||
*/ | ||
function __construct() | ||
{ | ||
$this->_serviceResource = 'Frauds/'; | ||
} | ||
|
||
/** | ||
* Returns the identifier | ||
* @return string||null | ||
*/ | ||
public function getIdentifier() | ||
{ | ||
return $this->_identifier; | ||
} | ||
|
||
/** | ||
* Sets the identifier | ||
* @param string $identifier | ||
* @return \Paymill\Models\Request\Fraud | ||
*/ | ||
public function setIdentifier($identifier) | ||
{ | ||
$this->_identifier = $identifier; | ||
return $this; | ||
} | ||
|
||
/** | ||
* Returns an array of parameters customized for the argumented methodname | ||
* @param string $method | ||
* @return array | ||
*/ | ||
public function parameterize($method) | ||
{ | ||
$parameterArray = array(); | ||
switch ($method) { | ||
case 'create': | ||
$parameterArray['Identifier'] = $this->getIdentifier(); | ||
break; | ||
case 'update': | ||
$parameterArray['Identifier'] = $this->getIdentifier(); | ||
break; | ||
case 'delete': | ||
break; | ||
case 'getOne': | ||
$parameterArray['count'] = 1; | ||
$parameterArray['offset'] = 0; | ||
break; | ||
case 'getAll': | ||
$parameterArray = $this->getFilter(); | ||
break; | ||
} | ||
|
||
return $parameterArray; | ||
} | ||
} |
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
Oops, something went wrong.