Class Mage_Paypal_Model_Report_Settlement

Description

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Located in /Paypal/Model/Report/Settlement.php (line 34)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Paypal_Model_Report_Settlement
Class Constant Summary
FILES_IN_CHARSET = "UTF-16"
FILES_OUT_CHARSET = "UTF-8"
REPORTS_HOSTNAME = "reports.paypal.com"
REPORTS_PATH = "/ppreports/outgoing"
SANDBOX_REPORTS_HOSTNAME = "reports.sandbox.paypal.com"
Variable Summary
array $_rows
Method Summary
int fetchAndSave (array $config)
string getFieldLabel (string $field)
array getRows ()
array getSftpCredentials ([bool $automaticMode = false])
void _construct ()
string _fileNameToDate (string $filename)
array _filterReportsList (array $list)
Variables
Methods
fetchAndSave (line 104)

Goes to specified host/path and fetches reports from there.

Save reports to database.

  • return: Number of report rows that were fetched and saved successfully
  • access: public
int fetchAndSave (array $config)
  • array $config: SFTP credentials
getFieldLabel (line 269)

Return name for row column

  • access: public
string getFieldLabel (string $field)
  • string $field: Field name in row model
getRows (line 258)

Return collected rows for further processing.

  • access: public
array getRows ()
getSftpCredentials (line 314)

Iterate through website configurations and collect all SFTP configurations Filter config values if necessary

  • access: public
array getSftpCredentials ([bool $automaticMode = false])
  • bool $automaticMode: Whether to skip settings with disabled Automatic Fetching or not
loadByAccountAndDate (line 247)

Load report by unique key (accoutn + report date)

  • access: public
Mage_Paypal_Model_Report_Settlement loadByAccountAndDate ()
parseCsv (line 157)

Parse CSV file and collect report rows

  • access: public
Mage_Paypal_Model_Report_Settlement parseCsv (string $localCsv)
  • string $localCsv: Path to CSV file
_beforeSave (line 85)

Stop saving process if file with same report date, account ID and last modified date was already ferched

  • access: protected
Mage_Core_Model_Abstract _beforeSave ()

Redefinition of:
Mage_Core_Model_Abstract::_beforeSave()
Processing object before save data
_construct (line 75)

Initialize resource model

  • access: protected
void _construct ()
_fileNameToDate (line 356)

Converts a filename to date of report.

  • access: protected
string _fileNameToDate (string $filename)
  • string $filename
_filterReportsList (line 370)

Filter SFTP file list by filename format

  • return: Trimmed down list of files
  • access: protected
array _filterReportsList (array $list)
  • array $list: List of files as per $connection->rawls()

Inherited Methods

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()
Class Constants
FILES_IN_CHARSET = "UTF-16" (line 58)

Original charset of report files

FILES_OUT_CHARSET = "UTF-8" (line 64)

Target charset of report files to be parsed

REPORTS_HOSTNAME = "reports.paypal.com" (line 40)

Default PayPal SFTP host

REPORTS_PATH = "/ppreports/outgoing" (line 52)

PayPal SFTP path

SANDBOX_REPORTS_HOSTNAME = "reports.sandbox.paypal.com" (line 46)

Default PayPal SFTP host for sandbox mode

Documentation generated on Fri, 11 Feb 2011 17:12:24 +0200 by phpDocumentor 1.4.3