Skip to content

Commit e68cf44

Browse files
authored
Additional changes per Google style guide.
1 parent aae3da3 commit e68cf44

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

samples/QuickBooks.gs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,27 @@ function logRedirectUri() {
2121
* Authorizes and makes a request to the QuickBooks API. Assumes the use of a
2222
* sandbox company.
2323
*/
24-
function run()
25-
{
24+
function run() {
2625
var service = getService();
2726
if (service.hasAccess()) {
2827
// Get the Company ID to be used in the request.
2928
var companyId = PropertiesService.getUserProperties()
3029
.getProperty('QuickBooks.companyId');
3130

3231
// Get company information as a test.
33-
var url = 'https://sandbox-quickbooks.api.intuit.com/v3/company/'
32+
var url = 'https://sandbox-quickbooks.api.intuit.com/v3/company/'
3433
+ companyId + '/companyinfo/' + companyId;
3534

36-
var response = UrlFetchApp.fetch(url, {
37-
headers: { Authorization: 'Bearer ' + service.getAccessToken(),
38-
Accept: 'application/json'}
35+
var response = UrlFetchApp.fetch(url, {
36+
headers: {
37+
Authorization: 'Bearer ' + service.getAccessToken(),
38+
Accept: 'application/json'
39+
}
3940
});
4041

4142
var result = JSON.parse(response.getContentText());
4243
Logger.log(JSON.stringify(result, null, 2));
43-
44-
}
45-
else {
44+
} else {
4645
// If not authorized, get authorization URL.
4746
var authorizationUrl = service.getAuthorizationUrl();
4847

@@ -88,8 +87,7 @@ function authCallback(request) {
8887
.setProperty('QuickBooks.companyId', request.parameter.realmId);
8988
Logger.log('Success!');
9089
return HtmlService.createHtmlOutput('Success!');
91-
}
92-
else {
90+
} else {
9391
return HtmlService.createHtmlOutput('Denied');
9492
}
9593
}

0 commit comments

Comments
 (0)