Skip to content

Commit

Permalink
Merge pull request #196 from Ridder90/patch-2
Browse files Browse the repository at this point in the history
add  method for pending settlement
  • Loading branch information
mickaelpois authored Oct 25, 2017
2 parents d802957 + 12fcbd4 commit c3c653e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions MangoPay/ApiDisputes.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ public function GetAll(& $pagination = null, $sorting = null)
return $this->GetList('disputes_all', $pagination, '\MangoPay\Dispute', null, null, $sorting);
}

/**
* List Disputes that need settling
* @param \MangoPay\Pagination $pagination Pagination object
* @param \MangoPay\Sorting $sorting Object to sorting data
* @return array Array with disputes
*/
public function GetPendingSettlements(& $pagination = null, $sorting = null)
{
return $this->GetList('disputes_pendingsettlement', $pagination, '\MangoPay\Dispute', null, null, $sorting);
}

/**
* Updates dispute's tag
* @param \MangoPay\Dispute Dispute object to update
Expand Down
1 change: 1 addition & 0 deletions MangoPay/Libraries/ApiBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ protected function getLogger()

'disputes_repudiation_create_settlement' => array( '/repudiations/%s/settlementtransfer', RequestType::POST),
'disputes_repudiation_get_settlement' => array( '/settlements/%s', RequestType::GET),
'disputes_pendingsettlement' => array('/disputes/pendingsettlement' , RequestType::GET),

'mandates_create' => array( '/mandates/directdebit/web', RequestType::POST ),
'mandates_save' => array( '/mandates/%s/cancel', RequestType::PUT ),
Expand Down

0 comments on commit c3c653e

Please sign in to comment.