for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
const ApiService = Shopware.Classes.ApiService;
Shopware
/** global: Shopware */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
/**
* Gateway for the API endpoint "promotion codes"
* @class
* @extends ApiService
*/
export default class PromotionCodeApiService extends ApiService {
constructor(httpClient, loginService, apiEndpoint = 'promotion') {
super(httpClient, loginService, apiEndpoint);
this.name = 'promotionCodeApiService';
}
* @returns {Promise<T>}
generateCodeFixed() {
const headers = this.getBasicHeaders();
return this.httpClient.get(
`/_action/${this.getApiBasePath()}/codes/generate-fixed`,
{
headers
).then((response) => {
return ApiService.handleResponse(response);
});
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.