Skip to content

Commit

Permalink
Hotfix #17
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian Pontes authored and Cristian Pontes committed Aug 16, 2017
1 parent 5f75257 commit 6d0daac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions Request/InsertRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ public function requireApproval()
*/
public function request()
{
if(count($this->records) < 2) {
$this->request->setParam('version', 2);
}
//@TODO: parsing for V2
// if(count($this->records) < 2) {
// $this->request->setParam('version', 2);
// }

return $this->request
->setParam('xmlData', $this->records)
Expand Down
7 changes: 4 additions & 3 deletions Request/UpdateRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ public function requireApproval()
*/
public function request()
{
if(count($this->records) < 2) {
$this->request->setParam('version', 2);
}
//@TODO: parsing for V2
// if(count($this->records) < 2) {
// $this->request->setParam('version', 2);
// }

return $this->request
->setParam('xmlData', $this->records)
Expand Down
2 changes: 1 addition & 1 deletion Tests/Request/InsertRecordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testSingleRecord()

$this->assertTrue($this->insertRecords->request());

$this->assertEquals(array('version' => 2, 'xmlData' => array($record)), $this->transport->paramList);
$this->assertEquals(array('version' => 4, 'xmlData' => array($record)), $this->transport->paramList);
}

public function testMultipleRecords()
Expand Down
2 changes: 1 addition & 1 deletion Tests/Request/UpdateRecordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testSingleRecord()
$this->transport->response = true;

$this->assertTrue($this->updateRecords->request());
$this->assertEquals(array('version' => 2, 'xmlData' => array(array('abc123'))), $this->transport->paramList);
$this->assertEquals(array('version' => 4, 'xmlData' => array(array('abc123'))), $this->transport->paramList);
}

public function testMultipleRecords()
Expand Down

0 comments on commit 6d0daac

Please sign in to comment.