Module: Customer Balance Quote API
enterprise_customerbalance_quote
Aliases: storecredit_quote
Method:
- enterprise_customerbalance_quote.removeAmount (SOAP V1)
- shoppingCartCustomerbalanceRemoveAmount (SOAP V2)
Allows you to remove store credit amount from the shopping cart (quote) and increase the customer store credit.
Arguments:
Type | Name | Description |
---|---|---|
string | sessionId | Session ID |
string | quoteId | Shopping cart ID (quote ID) |
string | store | Store view code or ID (optional) |
Return:
Type | Description |
---|---|
boolean | Result of removing the amount |
Faults:
Fault Code | Fault Message |
---|---|
100 | Provided data is invalid. |
103 | No quote found with requested id. |
104 | Store credit can not be used for quote created by guest. |
105 | No store found with requested id or code. |
Examples
Request Example SOAP V1
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl'); $sessionId = $proxy->login('apiUser', 'apiKey'); $quoteId = 15; $balanceAmountUsedInQuote = $proxy->call($sessionId, 'storecredit_quote.removeAmount', array($quoteId));
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url $sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary $result = $proxy->shoppingCartCustomerbalanceRemoveAmount($sessionId, '15'); var_dump($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); $sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey')); $result = $proxy->shoppingCartCustomerbalanceRemoveAmount((object)array('sessionId' => $sessionId->result, 'quoteId' => '15', 'store' => null)); var_dump($result->result);