-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GetTransactionListRequest and GetSettledBatchListRequest
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace CommerceGuys\AuthNet; | ||
|
||
use GuzzleHttp\Client; | ||
use CommerceGuys\AuthNet\Request\RequestInterface; | ||
|
||
/** | ||
* Retrieve detailed information about a specific transaction. | ||
* | ||
* @link https://developer.authorize.net/api/reference/index.html#transaction-reporting-get-settled-batch-list | ||
*/ | ||
class GetSettledBatchListRequest extends BaseApiRequest | ||
{ | ||
|
||
protected $includeStatistics; | ||
|
||
protected $firstSettlementDate; | ||
|
||
protected $lastSettlementDate; | ||
|
||
public function __construct( | ||
Configuration $configuration, | ||
Client $client, | ||
$includeStatistics, | ||
$firstSettlementDate, | ||
$lastSettlementDate | ||
) { | ||
parent::__construct($configuration, $client); | ||
$this->includeStatistics = $includeStatistics; | ||
$this->firstSettlementDate = $firstSettlementDate; | ||
$this->lastSettlementDate = $lastSettlementDate; | ||
} | ||
|
||
protected function attachData(RequestInterface $request) | ||
{ | ||
if ($this->includeStatistics) { | ||
$request->addData('includeStatistics', $this->includeStatistics); | ||
} | ||
$request->addData('firstSettlementDate', $this->firstSettlementDate); | ||
$request->addData('lastSettlementDate', $this->lastSettlementDate); | ||
} | ||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace CommerceGuys\AuthNet; | ||
|
||
use GuzzleHttp\Client; | ||
use CommerceGuys\AuthNet\Request\RequestInterface; | ||
|
||
/** | ||
* Retrieve detailed information about a specific transaction. | ||
* | ||
* @link https://developer.authorize.net/api/reference/index.html#transaction-reporting-get-transaction-list | ||
*/ | ||
class GetTransactionListRequest extends BaseApiRequest | ||
{ | ||
protected $batchId; | ||
|
||
public function __construct( | ||
Configuration $configuration, | ||
Client $client, | ||
$batchId | ||
) { | ||
parent::__construct($configuration, $client); | ||
$this->batchId = $batchId; | ||
} | ||
|
||
protected function attachData(RequestInterface $request) | ||
{ | ||
$request->addData('batchId', $this->batchId); | ||
} | ||
} |