Skip to content

Commit

Permalink
added customer baalance
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltay35 committed Dec 8, 2023
1 parent b950738 commit 0dbe0e6
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/APIs/Billing.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,47 @@ public function search(

return $this->get('search', $data, 'customer-transactions/');
}


/**
* Gets the Available Balance of the specified Customer.
*
* @param int $customerId
*
* @return array|Exception
* @throws Exception
* @link https://manage.resellerclub.com/kb/answer/872
*/
public function customerBalance($customerId)
{
return $this->get('customer-balance', ['customer-id' => $customerId]);
}


/**
* Adds funds in a Customer's Account.
*
* @param int $customerId Customer Id of the Customer in whose Debit Account these funds are to be added
* @param float $amount Amount to be added
* @param string $description Description for the Transaction
* @param string transaction-type Type of the Transaction. Possible values can be credit or receipt.
* @param string $transaction-key A unique Transaction key
* @param boolean $update-total-receipt Possible values are true or false. Pass true if the amount needs to be added to the Total Receipts figure of the Customer.
*
* @return array|Exception
* @throws Exception
* @link https://manage.resellerclub.com/kb/answer/1152
*/
public function addCustomerFund($customerId , $amount , $description,$transactionType,$transactionKey,$updateTotalReceipt = true)
{
return $this->post('add-customer-fund',
[
'customer-id' => $customerId,
'amount' => $amount,
'description' => $description,
'transaction-type' => $transactionType,
'transaction-key' => $transactionKey,
'update-total-receipt' => $updateTotalReceipt
]);
}
}

0 comments on commit 0dbe0e6

Please sign in to comment.