summaryrefslogtreecommitdiff
path: root/FS/FS/API.pm
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-04-20 19:48:53 -0500
committerJonathan Prykop <jonathan@freeside.biz>2016-04-22 12:10:58 -0500
commitf805cf286bb990b4bc99cc8136ffbaeef00af805 (patch)
tree4c141bd39f99d6620a0dbac3a0d799af34290aaf /FS/FS/API.pm
parent89e3f368f19ae733b2f82531d73bba2d7bf9e25a (diff)
RT#29296: API stuff: Add new locations [added eval field specs, debugged]
Diffstat (limited to 'FS/FS/API.pm')
-rw-r--r--FS/FS/API.pm35
1 files changed, 34 insertions, 1 deletions
diff --git a/FS/FS/API.pm b/FS/FS/API.pm
index 1c4cbd9..9d0ef25 100644
--- a/FS/FS/API.pm
+++ b/FS/FS/API.pm
@@ -568,6 +568,8 @@ secret
locationnum - pass this, or the following keys (don't pass both)
+locationname
+
address1
address2
@@ -580,8 +582,22 @@ state
zip
+addr_clean
+
country
+censustract
+
+censusyear
+
+location_type
+
+location_number
+
+location_kind
+
+incorporated
+
On error, returns a hashref with an 'error' key.
On success, returns a hashref with 'pkgnum' and 'locationnum' keys,
containing the new values.
@@ -598,7 +614,24 @@ sub change_package_location {
my %changeopt;
- foreach my $field ('locationnum',FS::cust_location::API::API_editable_fields()) {
+ foreach my $field ( qw(
+ locationnum
+ locationname
+ address1
+ address2
+ city
+ county
+ state
+ zip
+ addr_clean
+ country
+ censustract
+ censusyear
+ location_type
+ location_number
+ location_kind
+ incorporated
+ )) {
$changeopt{$field} = $opt{$field} if $opt{$field};
}