This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Payment): add change amount planned update action
- Loading branch information
Jens Schulze
committed
Mar 8, 2016
1 parent
0c6f36d
commit 2815f98
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/Request/Payments/Command/PaymentChangeAmountPlannedAction.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,39 @@ | ||
<?php | ||
/** | ||
* @author @jayS-de <jens.schulze@commercetools.de> | ||
*/ | ||
|
||
namespace Commercetools\Core\Request\Payments\Command; | ||
|
||
use Commercetools\Core\Model\Common\Context; | ||
use Commercetools\Core\Request\AbstractAction; | ||
use Commercetools\Core\Model\Common\Money; | ||
|
||
/** | ||
* @package Commercetools\Core\Request\Payments\Command | ||
* @link http://dev.commercetools.com/http-api-projects-payments.html#change-amount-planned | ||
* @method string getAction() | ||
* @method PaymentChangeAmountPlannedAction setAction(string $action = null) | ||
* @method Money getAmount() | ||
* @method PaymentChangeAmountPlannedAction setAmount(Money $amount = null) | ||
*/ | ||
class PaymentChangeAmountPlannedAction extends AbstractAction | ||
{ | ||
public function fieldDefinitions() | ||
{ | ||
return [ | ||
'action' => [static::TYPE => 'string'], | ||
'amount' => [static::TYPE => '\Commercetools\Core\Model\Common\Money'], | ||
]; | ||
} | ||
|
||
/** | ||
* @param array $data | ||
* @param Context|callable $context | ||
*/ | ||
public function __construct(array $data = [], $context = null) | ||
{ | ||
parent::__construct($data, $context); | ||
$this->setAction('changeAmountPlanned'); | ||
} | ||
} |