Class Mage_Payment_Model_Recurring_Profile

Description

Recurring payment profile

Extends from Mage_Core_Abstract for a reason: to make descendants have its own resource

Located in /Payment/Model/Recurring/Profile.php (line 31)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Payment_Model_Recurring_Profile
Direct descendents
Class Description
Mage_Sales_Model_Recurring_Profile Sales implementation of recurring payment profiles
Class Constant Summary
BUY_REQUEST_START_DATETIME = 'recurring_profile_start_datetime'
PERIOD_UNIT_DAY = 'day'
PERIOD_UNIT_MONTH = 'month'
PERIOD_UNIT_SEMI_MONTH = 'semi_month'
PERIOD_UNIT_WEEK = 'week'
PERIOD_UNIT_YEAR = 'year'
PRODUCT_OPTIONS_KEY = 'recurring_profile_options'
Variable Summary
Method Summary
Zend_Date|string exportStartDatetime ([bool $asString = true])
array getAllPeriodUnits ([bool $withLabels = true])
string|null getFieldComment (string $field)
string|null getFieldLabel (string $field)
void getPeriodUnitLabel (string $unit)
array getValidationErrors ([bool $isGrouped = true], [ $asMessage = false])
bool isValid ()
mixed renderData (string $key)
array _renderSchedule (string $periodKey, string $frequencyKey, string $cyclesKey)
bool _validatePeriodFrequency (string $unitKey, string $frequencyKey)
Variables
array $_errors = array() (line 57)

Errors collected during validation

  • access: protected
Mage_Core_Model_Locale $_locale = null (line 70)

Locale instance used for importing/exporting data

  • access: protected
Mage_Payment_Model_Method_Abstract $_methodInstance = null (line 63)
  • access: protected
array $_paymentMethods = array() (line 84)

Payment methods reference

  • access: protected
Mage_Core_Model_Store $_store = null (line 77)

Store instance used by locale or method instance

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_eventObject
Mage_Core_Model_Abstract::$_eventPrefix
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
exportScheduleInfo (line 266)

Render available schedule information

  • access: public
array exportScheduleInfo ()
exportStartDatetime (line 307)

Convert the start datetime (if set) to proper locale/timezone and return

  • access: public
Zend_Date|string exportStartDatetime ([bool $asString = true])
  • bool $asString
getAllPeriodUnits (line 350)

Getter for available period units

  • access: public
array getAllPeriodUnits ([bool $withLabels = true])
  • bool $withLabels
getFieldComment (line 447)

Getter for field comments

  • access: public
string|null getFieldComment (string $field)
  • string $field

Redefined in descendants as:
getFieldLabel (line 393)

Getter for field label

  • access: public
string|null getFieldLabel (string $field)
  • string $field

Redefined in descendants as:
getMethodInstance (line 563)

Return payment method instance

  • access: protected
Mage_Payment_Model_Method_Abstract getMethodInstance ()
getPeriodUnitLabel (line 375)

Render label for specified period unit

  • access: public
void getPeriodUnitLabel (string $unit)
  • string $unit
getValidationErrors (line 167)

Getter for errors that may appear after validation

  • access: public
array getValidationErrors ([bool $isGrouped = true], [ $asMessage = false])
  • bool $isGrouped
  • $asMessage
importBuyRequest (line 209)

Collect needed information from buy request Then filter data

  • throws: Mage_Core_Exception
  • access: public
Mage_Payment_Model_Recurring_Profile importBuyRequest ( $buyRequest)
  • Varien_Object $buyRequest
importProduct (line 233)

Import product recurring profile information Returns false if it cannot be imported

  • access: public
Mage_Payment_Model_Recurring_Profile|false importProduct ( $product)
isValid (line 92)

Check whether the object data is valid Returns true if valid.

  • access: public
bool isValid ()

Redefined in descendants as:
renderData (line 479)

Transform some specific data for output

  • access: public
mixed renderData (string $key)
  • string $key

Redefined in descendants as:
setLocale (line 326)

Locale instance setter

  • access: public
Mage_Payment_Model_Recurring_Profile setLocale ( $locale)
setMethodInstance (line 191)

Setter for payment method instance

  • throws: Exception
  • access: public
setNearestStartDatetime (line 290)

Determine nearest possible profile start date

  • access: public
Mage_Payment_Model_Recurring_Profile setNearestStartDatetime ([ $minAllowed = null])
  • Zend_Date $minAllowed
setStore (line 338)

Store instance setter

  • access: public
_beforeSave (line 609)

Validate before saving

  • access: protected

Redefinition of:
Mage_Core_Model_Abstract::_beforeSave()
Processing object before save data
_ensureLocaleAndStore (line 551)

Check that locale and store instances are set

  • throws: Exception
  • access: protected
void _ensureLocaleAndStore ()
_filterValues (line 504)

Filter self data to make sure it can be validated properly

  • access: protected

Redefined in descendants as:
_renderSchedule (line 625)

Generate explanations for specified schedule parameters

TODO: utilize Zend_Translate_Plural or similar stuff to render proper declensions with numerals.

  • access: protected
array _renderSchedule (string $periodKey, string $frequencyKey, string $cyclesKey)
  • string $periodKey
  • string $frequencyKey
  • string $cyclesKey
_validateBeforeSave (line 592)

Perform full validation before saving

  • throws: Mage_Core_Exception
  • access: protected
void _validateBeforeSave ()
_validatePeriodFrequency (line 579)

Check accordance of the unit and frequency

  • access: protected
bool _validatePeriodFrequency (string $unitKey, string $frequencyKey)
  • string $unitKey
  • string $frequencyKey

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
BUY_REQUEST_START_DATETIME = 'recurring_profile_start_datetime' (line 38)

Constants for passing data through catalog

PERIOD_UNIT_DAY = 'day' (line 46)

Period units

PERIOD_UNIT_MONTH = 'month' (line 49)
PERIOD_UNIT_SEMI_MONTH = 'semi_month' (line 48)
PERIOD_UNIT_WEEK = 'week' (line 47)
PERIOD_UNIT_YEAR = 'year' (line 50)
PRODUCT_OPTIONS_KEY = 'recurring_profile_options' (line 39)

Documentation generated on Fri, 11 Feb 2011 17:10:30 +0200 by phpDocumentor 1.4.3