Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions source/Paysafe/CustomerVaultService.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function deleteProfile( CustomerVault\Profile $profile )
* @param bool $includeeftbankaccount
* @param bool $includebacsbankaccount
* @param bool $includesepabankaccount
* @return bool
* @return \Paysafe\CustomerVault\Profile
* @throws PaysafeException
*/
public function getProfile( CustomerVault\Profile $profile, $includeAddresses = false, $includeCards = false, $includeachbankaccount = false, $includeeftbankaccount = false, $includebacsbankaccount = false, $includesepabankaccount = false )
Expand Down Expand Up @@ -318,7 +318,7 @@ public function deleteAddress( CustomerVault\Address $address )
* Get the address.
*
* @param \Paysafe\CustomerVault\Address $address
* @return bool
* @return \Paysafe\CustomerVault\Address
* @throws PaysafeException
*/
public function getAddress( CustomerVault\Address $address )
Expand Down Expand Up @@ -461,7 +461,7 @@ public function deleteCard( CustomerVault\Card $card )
* Get the card.
*
* @param \Paysafe\CustomerVault\Card $card
* @return bool
* @return \Paysafe\CustomerVault\Card
* @throws PaysafeException
*/
public function getCard( CustomerVault\Card $card )
Expand Down Expand Up @@ -736,7 +736,7 @@ public function updateACHBankAccount( CustomerVault\Profile $profile, CustomerVa
'billingAddressId',
'accountType'
));
$bankDetails->checkRequiredFields();
$bankDetails->checkRequiredFields();
$bankDetails->setOptionalFields(array(
'nickName',
'merchantRefNum',
Expand Down Expand Up @@ -882,7 +882,7 @@ public function deleteACHBankAccount( CustomerVault\Profile $profile, CustomerVa
*/
public function deleteEFTBankAccount( CustomerVault\Profile $profile, CustomerVault\EFTBankaccounts $bankDetails )
{

$bankDetails->setRequiredFields(array('id'));
$bankDetails->checkRequiredFields();
$profile->setRequiredFields(array('id'));
Expand Down Expand Up @@ -950,7 +950,7 @@ public function createMandates(CustomerVault\Mandates $mandates ,$bankaccounts)
'reference'
));
$mandates->checkRequiredFields();

$request = new Request(array(
'method' => Request::POST,
'uri' => $this->prepareURI("/profiles/" . $mandates->profileID."/".$bankaccounts."/".$mandates->bankAccountId."/mandates"),
Expand All @@ -959,17 +959,17 @@ public function createMandates(CustomerVault\Mandates $mandates ,$bankaccounts)

$response = $this->client->processRequest($request);
return new CustomerVault\Mandates($response);

}
/**
* Process Look Up a Mandates
* @param \Paysafe\CustomerVault\Mandate $mandates
* @return \Paysafe\CustomerVault\Mandates
* @throws PaysafeException
*/

public function getMandates(CustomerVault\Mandates $mandates) {

$mandates->setRequiredFields(array(
'id'
));
Expand All @@ -981,7 +981,7 @@ public function getMandates(CustomerVault\Mandates $mandates) {
));
$response = $this->client->processRequest($request);
return new CustomerVault\Mandates($response);

}
/**
* Process Update a Mandates
Expand All @@ -990,22 +990,22 @@ public function getMandates(CustomerVault\Mandates $mandates) {
* @throws PaysafeException
*/
public function updateMandates(CustomerVault\Mandates $mandates) {

$mandates->setRequiredFields(array(
'status'
'status'
));
$mandates->checkRequiredFields();
$request = new Request(array(
'method' => Request::PUT,
'uri' => $this->prepareURI("/profiles/" . $mandates->profileID."/mandates/".$mandates->id)
,'body' => $mandates
));

$response = $this->client->processRequest($request);
return new CustomerVault\Mandates($response);

}

/**
* Process Delete a Mandates
* @param \Paysafe\CustomerVault\Mandate $mandates
Expand All @@ -1020,6 +1020,6 @@ public function deleteMandates(CustomerVault\Mandates $mandates) {
));
$response = $this->client->processRequest($request);
return $response;

}
}