diff options
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Action/Address/Update.php')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Action/Address/Update.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Action/Address/Update.php b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Action/Address/Update.php new file mode 100644 index 00000000..862a8b9e --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/Civi/Api4/Action/Address/Update.php @@ -0,0 +1,43 @@ +<?php + +namespace Civi\Api4\Action\Address; + +use Civi\Api4\Generic\Result; + +/** + * @inheritDoc + */ +class Update extends \Civi\Api4\Generic\DAOUpdateAction { + + /** + * Optional param to indicate you want the street_address field parsed into individual params + * + * @var bool + */ + protected $streetParsing = TRUE; + + /** + * Optional param to indicate you want to skip geocoding (useful when importing a lot of addresses at once, the job Geocode and Parse Addresses can execute this task after the import) + * + * @var bool + */ + protected $skipGeocode = FALSE; + + /** + * When true, apply various fixes to the address before insert. + * + * @var bool + */ + protected $fixAddress = TRUE; + + /** + * @inheritDoc + */ + public function _run(Result $result) { + $this->values['street_parsing'] = $this->streetParsing; + $this->values['skip_geocode'] = $this->skipGeocode; + $this->values['fix_address'] = $this->fixAddress; + parent::_run($result); + } + +} |