@@ -15,13 +15,13 @@ |
||
15 | 15 | $groupIds=$abGroup->getAddressBookGroupIdByName( 'Louisville Group Temp'); |
16 | 16 | |
17 | 17 | if ($groupIds==null) { |
18 | - include('CreateAddressBookGroup.php'); |
|
19 | - $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
18 | + include('CreateAddressBookGroup.php'); |
|
19 | + $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $searchParameters = [ |
23 | - 'fields' => ['address_id'], |
|
24 | - 'group_id' => $groupIds[0], |
|
23 | + 'fields' => ['address_id'], |
|
24 | + 'group_id' => $groupIds[0], |
|
25 | 25 | ]; |
26 | 26 | |
27 | 27 | $addressBookContacts = $abGroup->getAddressBookContactsByGroup($searchParameters); |
@@ -12,11 +12,11 @@ |
||
12 | 12 | |
13 | 13 | // The example refers to the process of getting the address book locations by a group ID. |
14 | 14 | |
15 | -$groupIds=$abGroup->getAddressBookGroupIdByName( 'Louisville Group Temp'); |
|
15 | +$groupIds = $abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
16 | 16 | |
17 | 17 | if ($groupIds==null) { |
18 | 18 | include('CreateAddressBookGroup.php'); |
19 | - $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
19 | + $groupIds = $abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $searchParameters = [ |
@@ -14,8 +14,8 @@ |
||
14 | 14 | |
15 | 15 | // Get reandom address book group |
16 | 16 | $addressBookGroupParameters = [ |
17 | - 'limit' => 20, |
|
18 | - 'offset' => 0, |
|
17 | + 'limit' => 20, |
|
18 | + 'offset' => 0, |
|
19 | 19 | ]; |
20 | 20 | |
21 | 21 | $randomGroup = $abGroup->getRandomAddressBookGroup($addressBookGroupParameters); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | $randomGroup = $abGroup->getRandomAddressBookGroup($addressBookGroupParameters); |
22 | 22 | |
23 | -if (assert(null != $randomGroup, 'Cannot get a random address book group')); |
|
23 | +if (assert(null!=$randomGroup, 'Cannot get a random address book group')); |
|
24 | 24 | |
25 | 25 | // Get the address book group by group_id |
26 | 26 | $groupId = $randomGroup['group_id']; |
@@ -17,13 +17,13 @@ |
||
17 | 17 | $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
18 | 18 | |
19 | 19 | if ($groupIds==null) { |
20 | - include('CreateAddressBookGroup.php'); |
|
21 | - $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
20 | + include('CreateAddressBookGroup.php'); |
|
21 | + $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | $updateParameters= [ |
25 | - 'group_id' => $groupIds[0], |
|
26 | - 'group_color' => '7bd148' |
|
25 | + 'group_id' => $groupIds[0], |
|
26 | + 'group_color' => '7bd148' |
|
27 | 27 | ]; |
28 | 28 | |
29 | 29 | $results = $abGroup->updateAddressBookGroup($updateParameters); |
@@ -14,14 +14,14 @@ |
||
14 | 14 | // Note: you can find the allowed colors for the address book group at this link: |
15 | 15 | // https://github.com/route4me/route4me-json-schemas/blob/master/ColorSamples/AddressBookGroupAvailableColors.png |
16 | 16 | |
17 | -$groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
17 | +$groupIds = $abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
18 | 18 | |
19 | 19 | if ($groupIds==null) { |
20 | 20 | include('CreateAddressBookGroup.php'); |
21 | - $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
21 | + $groupIds = $abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
22 | 22 | } |
23 | 23 | |
24 | -$updateParameters= [ |
|
24 | +$updateParameters = [ |
|
25 | 25 | 'group_id' => $groupIds[0], |
26 | 26 | 'group_color' => '7bd148' |
27 | 27 | ]; |
@@ -15,12 +15,12 @@ |
||
15 | 15 | $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
16 | 16 | |
17 | 17 | if ($groupIds==null) { |
18 | - include('CreateAddressBookGroup.php'); |
|
19 | - $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
18 | + include('CreateAddressBookGroup.php'); |
|
19 | + $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $updateParameters= [ |
23 | - 'group_id' => $groupIds[0] |
|
23 | + 'group_id' => $groupIds[0] |
|
24 | 24 | ]; |
25 | 25 | |
26 | 26 | $result = $abGroup->removeAddressBookGroup($updateParameters); |
@@ -12,14 +12,14 @@ |
||
12 | 12 | |
13 | 13 | // The example refers to the process of removing an address book group from a user's account. |
14 | 14 | |
15 | -$groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
15 | +$groupIds = $abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
16 | 16 | |
17 | 17 | if ($groupIds==null) { |
18 | 18 | include('CreateAddressBookGroup.php'); |
19 | - $groupIds=$abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
19 | + $groupIds = $abGroup->getAddressBookGroupIdByName('Louisville Group Temp'); |
|
20 | 20 | } |
21 | 21 | |
22 | -$updateParameters= [ |
|
22 | +$updateParameters = [ |
|
23 | 23 | 'group_id' => $groupIds[0] |
24 | 24 | ]; |
25 | 25 |
@@ -15,17 +15,17 @@ |
||
15 | 15 | // https://github.com/route4me/route4me-json-schemas/blob/master/ColorSamples/AddressBookGroupAvailableColors.png |
16 | 16 | |
17 | 17 | $createParameters= [ |
18 | - 'group_name' => 'Louisville Group Temp', |
|
19 | - 'group_color' => '92e1c0', |
|
20 | - 'filter' => [ |
|
21 | - 'condition' => 'AND', |
|
22 | - 'rules' => [[ |
|
23 | - 'id' => 'address_1', |
|
24 | - 'field' => 'address_1', |
|
25 | - 'operator' => 'contains', |
|
26 | - 'value' => 'Luisville' |
|
27 | - ]] |
|
28 | - ] |
|
18 | + 'group_name' => 'Louisville Group Temp', |
|
19 | + 'group_color' => '92e1c0', |
|
20 | + 'filter' => [ |
|
21 | + 'condition' => 'AND', |
|
22 | + 'rules' => [[ |
|
23 | + 'id' => 'address_1', |
|
24 | + 'field' => 'address_1', |
|
25 | + 'operator' => 'contains', |
|
26 | + 'value' => 'Luisville' |
|
27 | + ]] |
|
28 | + ] |
|
29 | 29 | ]; |
30 | 30 | |
31 | 31 | $createdAddressBookGroup = $abGroup->createAddressBookGroup($createParameters); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | // Note: you can find the allowed colors for the address book group at this link: |
15 | 15 | // https://github.com/route4me/route4me-json-schemas/blob/master/ColorSamples/AddressBookGroupAvailableColors.png |
16 | 16 | |
17 | -$createParameters= [ |
|
17 | +$createParameters = [ |
|
18 | 18 | 'group_name' => 'Louisville Group Temp', |
19 | 19 | 'group_color' => '92e1c0', |
20 | 20 | 'filter' => [ |
@@ -13,8 +13,8 @@ |
||
13 | 13 | // The example refers to the process of getting limited number of the address book groups. |
14 | 14 | |
15 | 15 | $addressBookGroupParameters = [ |
16 | - 'limit' => 20, |
|
17 | - 'offset' => 0, |
|
16 | + 'limit' => 20, |
|
17 | + 'offset' => 0, |
|
18 | 18 | ]; |
19 | 19 | |
20 | 20 | $addressBookGroups = $abGroup->getAddressBookGroups($addressBookGroupParameters); |
@@ -10,24 +10,24 @@ discard block |
||
10 | 10 | |
11 | 11 | //region // Add a location, scheduled daily with custom data. |
12 | 12 | $AddressBookLocationParameters = AddressBookLocation::fromArray([ |
13 | - 'address_1' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214', |
|
14 | - 'address_alias' => '1604 PARKRIDGE PKWY 40214', |
|
15 | - 'address_group' => 'Scheduled daily', |
|
16 | - 'first_name' => 'Peter', |
|
17 | - 'last_name' => 'Newman', |
|
18 | - 'address_email' => '[email protected]', |
|
19 | - 'address_phone_number' => '65432178', |
|
20 | - 'cached_lat' => 38.141598, |
|
21 | - 'cached_lng' => -85.793846, |
|
22 | - 'address_city' => 'Louisville', |
|
23 | - 'address_custom_data' => ['scheduled' => 'yes', |
|
24 | - 'serice type' => 'publishing', ], |
|
25 | - 'schedule' => [[ |
|
26 | - 'enabled' => true, |
|
27 | - 'mode' => 'daily', |
|
28 | - 'daily' => ['every' => 1], |
|
29 | - ]], |
|
30 | - 'service_time' => 900, |
|
13 | + 'address_1' => '1604 PARKRIDGE PKWY, Louisville, KY, 40214', |
|
14 | + 'address_alias' => '1604 PARKRIDGE PKWY 40214', |
|
15 | + 'address_group' => 'Scheduled daily', |
|
16 | + 'first_name' => 'Peter', |
|
17 | + 'last_name' => 'Newman', |
|
18 | + 'address_email' => '[email protected]', |
|
19 | + 'address_phone_number' => '65432178', |
|
20 | + 'cached_lat' => 38.141598, |
|
21 | + 'cached_lng' => -85.793846, |
|
22 | + 'address_city' => 'Louisville', |
|
23 | + 'address_custom_data' => ['scheduled' => 'yes', |
|
24 | + 'serice type' => 'publishing', ], |
|
25 | + 'schedule' => [[ |
|
26 | + 'enabled' => true, |
|
27 | + 'mode' => 'daily', |
|
28 | + 'daily' => ['every' => 1], |
|
29 | + ]], |
|
30 | + 'service_time' => 900, |
|
31 | 31 | ]); |
32 | 32 | |
33 | 33 | $abContacts1 = new AddressBookLocation(); |
@@ -42,27 +42,27 @@ discard block |
||
42 | 42 | |
43 | 43 | //region // Add a location, scheduled weekly. |
44 | 44 | $AddressBookLocationParameters = AddressBookLocation::fromArray([ |
45 | - 'address_1' => '1407 MCCOY, Louisville, KY, 40215', |
|
46 | - 'address_alias' => '1407 MCCOY 40215', |
|
47 | - 'address_group' => 'Scheduled weekly', |
|
48 | - 'first_name' => 'Bart', |
|
49 | - 'last_name' => 'Douglas', |
|
50 | - 'address_email' => '[email protected]', |
|
51 | - 'address_phone_number' => '95487454', |
|
52 | - 'cached_lat' => 38.202496, |
|
53 | - 'cached_lng' => -85.786514, |
|
54 | - 'curbside_lat' => 38.202496, |
|
55 | - 'curbside_lng' => -85.786514, |
|
56 | - 'address_city' => 'Louisville', |
|
57 | - 'schedule' => [[ |
|
58 | - 'enabled' => true, |
|
59 | - 'mode' => 'weekly', |
|
60 | - 'weekly' => [ |
|
61 | - 'every' => 1, |
|
62 | - 'weekdays' => [1, 2, 3, 4, 5], |
|
63 | - ], |
|
64 | - ]], |
|
65 | - 'service_time' => 600, |
|
45 | + 'address_1' => '1407 MCCOY, Louisville, KY, 40215', |
|
46 | + 'address_alias' => '1407 MCCOY 40215', |
|
47 | + 'address_group' => 'Scheduled weekly', |
|
48 | + 'first_name' => 'Bart', |
|
49 | + 'last_name' => 'Douglas', |
|
50 | + 'address_email' => '[email protected]', |
|
51 | + 'address_phone_number' => '95487454', |
|
52 | + 'cached_lat' => 38.202496, |
|
53 | + 'cached_lng' => -85.786514, |
|
54 | + 'curbside_lat' => 38.202496, |
|
55 | + 'curbside_lng' => -85.786514, |
|
56 | + 'address_city' => 'Louisville', |
|
57 | + 'schedule' => [[ |
|
58 | + 'enabled' => true, |
|
59 | + 'mode' => 'weekly', |
|
60 | + 'weekly' => [ |
|
61 | + 'every' => 1, |
|
62 | + 'weekdays' => [1, 2, 3, 4, 5], |
|
63 | + ], |
|
64 | + ]], |
|
65 | + 'service_time' => 600, |
|
66 | 66 | ]); |
67 | 67 | |
68 | 68 | $abContacts2 = new AddressBookLocation(); |
@@ -77,33 +77,33 @@ discard block |
||
77 | 77 | |
78 | 78 | //region // Add a location, scheduled monthly (dates mode). |
79 | 79 | $AddressBookLocationParameters = AddressBookLocation::fromArray([ |
80 | - 'address_1' => '4805 BELLEVUE AVE, Louisville, KY, 40215', |
|
81 | - 'address_2' => '4806 BELLEVUE AVE, Louisville, KY, 40215', |
|
82 | - 'address_alias' => '4805 BELLEVUE AVE 40215', |
|
83 | - 'address_group' => 'Scheduled monthly', |
|
84 | - 'first_name' => 'Bart', |
|
85 | - 'last_name' => 'Douglas', |
|
86 | - 'address_email' => '[email protected]', |
|
87 | - 'address_phone_number' => '95487454', |
|
88 | - 'cached_lat' => 38.178844, |
|
89 | - 'cached_lng' => -85.774864, |
|
90 | - 'curbside_lat' => 38.178844, |
|
91 | - 'curbside_lng' => -85.774864, |
|
92 | - 'address_city' => 'Louisville', |
|
93 | - 'address_country_id' => 'US', |
|
94 | - 'address_state_id' => 'KY', |
|
95 | - 'address_zip' => '40215', |
|
96 | - 'schedule' => [[ |
|
97 | - 'enabled' => true, |
|
98 | - 'mode' => 'monthly', |
|
99 | - 'monthly' => [ |
|
100 | - 'every' => 1, |
|
101 | - 'mode' => 'dates', |
|
102 | - 'dates' => [20, 22, 23, 24, 25], |
|
103 | - ], |
|
104 | - ]], |
|
105 | - 'service_time' => 750, |
|
106 | - 'color' => 'red', |
|
80 | + 'address_1' => '4805 BELLEVUE AVE, Louisville, KY, 40215', |
|
81 | + 'address_2' => '4806 BELLEVUE AVE, Louisville, KY, 40215', |
|
82 | + 'address_alias' => '4805 BELLEVUE AVE 40215', |
|
83 | + 'address_group' => 'Scheduled monthly', |
|
84 | + 'first_name' => 'Bart', |
|
85 | + 'last_name' => 'Douglas', |
|
86 | + 'address_email' => '[email protected]', |
|
87 | + 'address_phone_number' => '95487454', |
|
88 | + 'cached_lat' => 38.178844, |
|
89 | + 'cached_lng' => -85.774864, |
|
90 | + 'curbside_lat' => 38.178844, |
|
91 | + 'curbside_lng' => -85.774864, |
|
92 | + 'address_city' => 'Louisville', |
|
93 | + 'address_country_id' => 'US', |
|
94 | + 'address_state_id' => 'KY', |
|
95 | + 'address_zip' => '40215', |
|
96 | + 'schedule' => [[ |
|
97 | + 'enabled' => true, |
|
98 | + 'mode' => 'monthly', |
|
99 | + 'monthly' => [ |
|
100 | + 'every' => 1, |
|
101 | + 'mode' => 'dates', |
|
102 | + 'dates' => [20, 22, 23, 24, 25], |
|
103 | + ], |
|
104 | + ]], |
|
105 | + 'service_time' => 750, |
|
106 | + 'color' => 'red', |
|
107 | 107 | ]); |
108 | 108 | |
109 | 109 | $abContacts3 = new AddressBookLocation(); |
@@ -118,36 +118,36 @@ discard block |
||
118 | 118 | |
119 | 119 | //region // AAdd a location, scheduled monthly (nth mode). |
120 | 120 | $AddressBookLocationParameters = AddressBookLocation::fromArray([ |
121 | - 'address_1' => '730 CECIL AVENUE, Louisville, KY, 40211', |
|
122 | - 'address_alias' => '730 CECIL AVENUE 40211', |
|
123 | - 'address_group' => 'Scheduled monthly', |
|
124 | - 'first_name' => 'David', |
|
125 | - 'last_name' => 'Silvester', |
|
126 | - 'address_email' => '[email protected]', |
|
127 | - 'address_phone_number' => '36985214', |
|
128 | - 'cached_lat' => 38.248684, |
|
129 | - 'cached_lng' => -85.821121, |
|
130 | - 'curbside_lat' => 38.248684, |
|
131 | - 'curbside_lng' => -85.821121, |
|
132 | - 'address_city' => 'Louisville', |
|
133 | - 'address_custom_data' => [ |
|
134 | - 'scheduled' => 'yes', |
|
135 | - 'service type' => 'library', |
|
136 | - ], |
|
137 | - 'schedule' => [[ |
|
138 | - 'enabled' => true, |
|
139 | - 'mode' => 'monthly', |
|
140 | - 'monthly' => [ |
|
141 | - 'every' => 1, |
|
142 | - 'mode' => 'nth', |
|
143 | - 'nth' => [ |
|
144 | - 'n' => 1, |
|
145 | - 'what' => 4, |
|
146 | - ], |
|
147 | - ], |
|
148 | - ]], |
|
149 | - 'service_time' => 450, |
|
150 | - 'address_icon' => 'emoji/emoji-bus', |
|
121 | + 'address_1' => '730 CECIL AVENUE, Louisville, KY, 40211', |
|
122 | + 'address_alias' => '730 CECIL AVENUE 40211', |
|
123 | + 'address_group' => 'Scheduled monthly', |
|
124 | + 'first_name' => 'David', |
|
125 | + 'last_name' => 'Silvester', |
|
126 | + 'address_email' => '[email protected]', |
|
127 | + 'address_phone_number' => '36985214', |
|
128 | + 'cached_lat' => 38.248684, |
|
129 | + 'cached_lng' => -85.821121, |
|
130 | + 'curbside_lat' => 38.248684, |
|
131 | + 'curbside_lng' => -85.821121, |
|
132 | + 'address_city' => 'Louisville', |
|
133 | + 'address_custom_data' => [ |
|
134 | + 'scheduled' => 'yes', |
|
135 | + 'service type' => 'library', |
|
136 | + ], |
|
137 | + 'schedule' => [[ |
|
138 | + 'enabled' => true, |
|
139 | + 'mode' => 'monthly', |
|
140 | + 'monthly' => [ |
|
141 | + 'every' => 1, |
|
142 | + 'mode' => 'nth', |
|
143 | + 'nth' => [ |
|
144 | + 'n' => 1, |
|
145 | + 'what' => 4, |
|
146 | + ], |
|
147 | + ], |
|
148 | + ]], |
|
149 | + 'service_time' => 450, |
|
150 | + 'address_icon' => 'emoji/emoji-bus', |
|
151 | 151 | ]); |
152 | 152 | |
153 | 153 | $abContacts4 = new AddressBookLocation(); |
@@ -162,29 +162,29 @@ discard block |
||
162 | 162 | |
163 | 163 | //region // Add a location with the daily scheduling and blacklist. |
164 | 164 | $AddressBookLocationParameters = AddressBookLocation::fromArray([ |
165 | - 'address_1' => '4629 HILLSIDE DRIVE, Louisville, KY, 40216', |
|
166 | - 'address_alias' => '4629 HILLSIDE DRIVE 40216', |
|
167 | - 'address_group' => 'Scheduled daily', |
|
168 | - 'first_name' => 'Kim', |
|
169 | - 'last_name' => 'Shandor', |
|
170 | - 'address_email' => '[email protected]', |
|
171 | - 'address_phone_number' => '9874152', |
|
172 | - 'cached_lat' => 38.176067, |
|
173 | - 'cached_lng' => -85.824638, |
|
174 | - 'curbside_lat' => 38.176067, |
|
175 | - 'curbside_lng' => -85.824638, |
|
176 | - 'address_city' => 'Louisville', |
|
177 | - 'address_custom_data' => [ |
|
178 | - 'scheduled' => 'yes', |
|
179 | - 'serice type' => 'appliance', |
|
180 | - ], |
|
181 | - 'schedule' => [ |
|
182 | - 'enabled' => true, |
|
183 | - 'mode' => 'daily', |
|
184 | - 'daily' => ['every' => 1], |
|
185 | - ], |
|
186 | - 'schedule_blacklist' => ['2017-02-24', '2017-02-25'], |
|
187 | - 'service_time' => 300, |
|
165 | + 'address_1' => '4629 HILLSIDE DRIVE, Louisville, KY, 40216', |
|
166 | + 'address_alias' => '4629 HILLSIDE DRIVE 40216', |
|
167 | + 'address_group' => 'Scheduled daily', |
|
168 | + 'first_name' => 'Kim', |
|
169 | + 'last_name' => 'Shandor', |
|
170 | + 'address_email' => '[email protected]', |
|
171 | + 'address_phone_number' => '9874152', |
|
172 | + 'cached_lat' => 38.176067, |
|
173 | + 'cached_lng' => -85.824638, |
|
174 | + 'curbside_lat' => 38.176067, |
|
175 | + 'curbside_lng' => -85.824638, |
|
176 | + 'address_city' => 'Louisville', |
|
177 | + 'address_custom_data' => [ |
|
178 | + 'scheduled' => 'yes', |
|
179 | + 'serice type' => 'appliance', |
|
180 | + ], |
|
181 | + 'schedule' => [ |
|
182 | + 'enabled' => true, |
|
183 | + 'mode' => 'daily', |
|
184 | + 'daily' => ['every' => 1], |
|
185 | + ], |
|
186 | + 'schedule_blacklist' => ['2017-02-24', '2017-02-25'], |
|
187 | + 'service_time' => 300, |
|
188 | 188 | ]); |
189 | 189 | |
190 | 190 | $abContacts5 = new AddressBookLocation(); |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | Route4Me::setApiKey(Constants::API_KEY); |
13 | 13 | |
14 | 14 | $AddressBookLocationParameters = AddressBookLocation::fromArray([ |
15 | - 'first_name' => 'Test FirstName '.strval(rand(10000, 99999)), |
|
16 | - 'address_1' => 'Test Address1 '.strval(rand(10000, 99999)), |
|
17 | - 'cached_lat' => 38.024654, |
|
18 | - 'cached_lng' => -77.338814, |
|
15 | + 'first_name' => 'Test FirstName '.strval(rand(10000, 99999)), |
|
16 | + 'address_1' => 'Test Address1 '.strval(rand(10000, 99999)), |
|
17 | + 'cached_lat' => 38.024654, |
|
18 | + 'cached_lng' => -77.338814, |
|
19 | 19 | ]); |
20 | 20 | |
21 | 21 | $abLocation = new AddressBookLocation(); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | assert(isset($abcResult['address_id']), 'Cannot create an address book location. <br><br>'); |
28 | 28 | |
29 | 29 | if (isset($abcResult['address_id'])) { |
30 | - $address_id = $abcResult['address_id']; |
|
30 | + $address_id = $abcResult['address_id']; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | assert($address_id != -1, 'Cannot create an address book location. <br><br>'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $address_id = $abcResult['address_id']; |
31 | 31 | } |
32 | 32 | |
33 | -assert($address_id != -1, 'Cannot create an address book location. <br><br>'); |
|
33 | +assert($address_id!=-1, 'Cannot create an address book location. <br><br>'); |
|
34 | 34 | |
35 | 35 | echo 'Address Book Location with <b>address_id = '.strval($address_id).'</b> and <b>first_name = '.$abcResult['first_name'].'</b> was successfully added<br>'; |
36 | 36 | |
@@ -40,6 +40,6 @@ discard block |
||
40 | 40 | |
41 | 41 | assert(isset($abcResult['first_name']), 'Cannot update the address book location. <br><br>'); |
42 | 42 | |
43 | -assert('Test First Name Updated' == $abcResult['first_name'], 'Cannot update the address book location. <br><br>'); |
|
43 | +assert('Test First Name Updated'==$abcResult['first_name'], 'Cannot update the address book location. <br><br>'); |
|
44 | 44 | |
45 | 45 | echo 'The field <b>first_name</b> in the address book location <b>'.$address_id.'</b> was update to <b>Test First Name Updated</b> successfuly <br>'; |
@@ -18,14 +18,14 @@ |
||
18 | 18 | |
19 | 19 | $territoryParams['type'] = TerritoryTypes::CIRCLE; |
20 | 20 | $territoryParams['data'] = [ |
21 | - '37.569752822786455,-77.47833251953125', |
|
22 | - '5000', |
|
21 | + '37.569752822786455,-77.47833251953125', |
|
22 | + '5000', |
|
23 | 23 | ]; |
24 | 24 | |
25 | 25 | $avoidanceZoneParameters = AvoidanceZone::fromArray([ |
26 | - 'territory_name' => 'Test Territory '.strval(rand(10000, 99999)), |
|
27 | - 'territory_color' => 'ff7700', |
|
28 | - 'territory' => $territoryParams, |
|
26 | + 'territory_name' => 'Test Territory '.strval(rand(10000, 99999)), |
|
27 | + 'territory_color' => 'ff7700', |
|
28 | + 'territory' => $territoryParams, |
|
29 | 29 | ]); |
30 | 30 | |
31 | 31 | $avoidanceZone = new AvoidanceZone(); |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | $avoidanceZone = new AvoidanceZone(); |
32 | 32 | |
33 | -$result = (array) $avoidanceZone->addAvoidanceZone($avoidanceZoneParameters); |
|
33 | +$result = (array)$avoidanceZone->addAvoidanceZone($avoidanceZoneParameters); |
|
34 | 34 | |
35 | 35 | assert(isset($result), 'Failed to create new Avoidance Zone'); |
36 | 36 |