Mage_GoogleCheckout_Model_Api Class Reference

Inheritance diagram for Mage_GoogleCheckout_Model_Api:

Varien_Object

List of all members.

Public Member Functions

 checkout (Mage_Sales_Model_Quote $quote)
 authorize ($gOrderId)
 charge ($gOrderId, $amount)
 refund ($gOrderId, $amount, $reason, $comment='')
 cancel ($gOrderId, $reason, $comment='')
 process ($gOrderId)
 deliver ($gOrderId, $carrier, $trackingNo, $sendMail=true)
 addTrackingData ($gOrderId, $carrier, $trackingNo)
 shipItems ($gOrderId, array $items)
 backorderItems ()
 returnItems ()
 cancelItems ()
 resetItemsShippingInformation ()
 addMerchantOrderNumber ()
 sendBuyerMessage ()
 archiveOrder ()
 unarchiveOrder ()
 processCallback ()
 processBeacon ()

Protected Member Functions

 _getApi ($area)


Detailed Description

Definition at line 27 of file Api.php.


Member Function Documentation

_getApi ( area  )  [protected]

Definition at line 29 of file Api.php.

00030     {
00031         $api = Mage::getModel('googlecheckout/api_xml_'.$area)->setStoreId($this->getStoreId());
00032         $api->setApi($this);
00033         return $api;
00034     }

addMerchantOrderNumber (  ) 

Definition at line 150 of file Api.php.

00151     {
00152 
00153     }

addTrackingData ( gOrderId,
carrier,
trackingNo 
)

Definition at line 100 of file Api.php.

00101     {
00102         $api = $this->_getApi('order')
00103             ->setGoogleOrderNumber($gOrderId)
00104             ->addTrackingData($carrier, $trackingNo);
00105         return $api;
00106     }

archiveOrder (  ) 

Definition at line 166 of file Api.php.

00167     {
00168         $api = $this->_getApi('order')
00169             ->setOrder($order)
00170             ->setItems($items)
00171             ->shipItems();
00172         return $api;
00173     }

authorize ( gOrderId  ) 

Definition at line 46 of file Api.php.

00047     {
00048         $api = $this->_getApi('order')
00049             ->setGoogleOrderNumber($gOrderId)
00050             ->authorize();
00051         return $api;
00052     }

backorderItems (  ) 

Definition at line 118 of file Api.php.

00119     {
00120         $api = $this->_getApi('order')
00121             ->setOrder($order)
00122             ->setItems($items)
00123             ->shipItems();
00124         return $api;
00125     }

cancel ( gOrderId,
reason,
comment = '' 
)

Definition at line 70 of file Api.php.

00071     {
00072         $api = $this->_getApi('order')
00073             ->setGoogleOrderNumber($gOrderId)
00074             ->cancel($reason, $comment);
00075         return $api;
00076     }

cancelItems (  ) 

Definition at line 136 of file Api.php.

00137     {
00138         $api = $this->_getApi('order')
00139             ->setOrder($order)
00140             ->setItems($items)
00141             ->shipItems();
00142         return $api;
00143     }

charge ( gOrderId,
amount 
)

Definition at line 54 of file Api.php.

00055     {
00056         $api = $this->_getApi('order')
00057             ->setGoogleOrderNumber($gOrderId)
00058             ->charge($amount);
00059         return $api;
00060     }

checkout ( Mage_Sales_Model_Quote quote  ) 

Definition at line 37 of file Api.php.

00038     {
00039         $api = $this->_getApi('checkout')
00040             ->setQuote($quote)
00041             ->checkout();
00042         return $api;
00043     }

deliver ( gOrderId,
carrier,
trackingNo,
sendMail = true 
)

Definition at line 88 of file Api.php.

00089     {
00090         $gCarriers = array('dhl'=>'DHL', 'fedex'=>'FedEx', 'ups'=>'UPS', 'usps'=>'USPS');
00091         $carrier = strtolower($carrier);
00092         $carrier = isset($gCarriers[$carrier]) ? $gCarriers[$carrier] : 'Other';
00093 
00094         $api = $this->_getApi('order')
00095             ->setGoogleOrderNumber($gOrderId)
00096             ->deliver($carrier, $trackingNo, $sendMail);
00097         return $api;
00098     }

process ( gOrderId  ) 

Definition at line 80 of file Api.php.

00081     {
00082         $api = $this->_getApi('order')
00083             ->setGoogleOrderNumber($gOrderId)
00084             ->process();
00085         return $api;
00086     }

processBeacon (  ) 

Definition at line 192 of file Api.php.

00193     {
00194         $debug = Mage::getModel('googlecheckout/api_debug')->setDir('in')
00195             ->setUrl('googlecheckout/api/beacon')
00196             ->setRequestBody($_SERVER['QUERY_STRING'])
00197             ->save();
00198     }

processCallback (  ) 

Definition at line 186 of file Api.php.

00187     {
00188         $api = $this->_getApi('callback')->process();
00189         return $api;
00190     }

refund ( gOrderId,
amount,
reason,
comment = '' 
)

Definition at line 62 of file Api.php.

00063     {
00064         $api = $this->_getApi('order')
00065             ->setGoogleOrderNumber($gOrderId)
00066             ->refund($amount, $reason, $comment);
00067         return $api;
00068     }

resetItemsShippingInformation (  ) 

Definition at line 145 of file Api.php.

00146     {
00147 
00148     }

returnItems (  ) 

Definition at line 127 of file Api.php.

00128     {
00129         $api = $this->_getApi('order')
00130             ->setOrder($order)
00131             ->setItems($items)
00132             ->shipItems();
00133         return $api;
00134     }

sendBuyerMessage (  ) 

Definition at line 155 of file Api.php.

00156     {
00157         $api = $this->_getApi('order')
00158             ->setOrder($order)
00159             ->setItems($items)
00160             ->shipItems();
00161         return $api;
00162     }

shipItems ( gOrderId,
array items 
)

Definition at line 110 of file Api.php.

00111     {
00112         $api = $this->_getApi('order')
00113             ->setGoogleOrderNumber($gOrderId)
00114             ->shipItems($items);
00115         return $api;
00116     }

unarchiveOrder (  ) 

Definition at line 175 of file Api.php.

00176     {
00177         $api = $this->_getApi('order')
00178             ->setOrder($order)
00179             ->setItems($items)
00180             ->shipItems();
00181         return $api;
00182     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:16 2009 for Magento by  doxygen 1.5.8