You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/includes/_utilities.md
+42-42Lines changed: 42 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,48 @@ This fetches an object containing the array of VINs on the current page and a co
126
126
127
127
This fetches the <ahref="#page-event">Page Event object</a> for the current website and page.
128
128
129
+
## API.utils.getUnlockedVehicles()
130
+
The utility method `getUnlockedVehicles` returns an array of vehicle UUIDs where the vehicle's pricing has already been unlocked.
131
+
132
+
This can be useful when paired with the `unlockPricing` method. When `vehicle-data-updated-v1` triggers, a list of currently displayed vehicles is provided. You could gather the list of vehicles, skip the ones which are already unlocked, and then call your service for a smaller subset of vehicles which may need to be unlocked.
// Unlock vehicles which are not already unlocked, and your service indicates should be unlocked.
165
+
API.utils.unlockPricing(uuidsToUnlock);
166
+
167
+
});
168
+
})(window.DDC.APILoader);
169
+
```
170
+
129
171
## API.utils.getUrlParams()
130
172
131
173
> Usage:
@@ -169,48 +211,6 @@ Will return the following object:
169
211
})(window.DDC.APILoader);
170
212
```
171
213
172
-
## API.utils.getUnlockedVehicles()
173
-
The utility method `getUnlockedVehicles` returns an array of vehicle UUIDs where the vehicle's pricing has already been unlocked.
174
-
175
-
This can be useful when paired with the `unlockPricing` method. When `vehicle-data-updated-v1` triggers, a list of currently displayed vehicles is provided. You could gather the list of vehicles, skip the ones which are already unlocked, and then call your service for a smaller subset of vehicles which may need to be unlocked.
0 commit comments