Skip to content

Commit 9f2172e

Browse files
Merge pull request #25 from crhistianramirez/product-facets
update auth file (didn't get picked up in last codegen)
2 parents 585b7a5 + 5bb5391 commit 9f2172e

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/api/Auth.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
(function(root, factory) {
1616
if (typeof define === 'function' && define.and) {
1717
// AMD. Register as an anonymous module.
18-
define(['ApiClient', 'model/AccessToken'], factory);
18+
define(['Sdk', 'model/AccessToken'], factory);
1919
} else if (typeof module === 'object' && module.exports) {
2020
// CommonJS-like environments that support module.exports, like Node.
21-
module.exports = factory(require('../ApiClient'), require('../model/AccessToken'));
21+
module.exports = factory(require('../Sdk'), require('../model/AccessToken'));
2222
} else {
2323
if (!root.OrderCloud) {
2424
root.OrderCloud = {};
2525
}
26-
root.OrderCloud.Auth = factory(root.OrderCloud.ApiClient, root.OrderCloud.AccessToken);
26+
root.OrderCloud.Auth = factory(root.OrderCloud.Sdk, root.OrderCloud.AccessToken);
2727
}
28-
}(this, function(ApiClient, AccessToken) {
28+
}(this, function(Sdk, AccessToken) {
2929
'use strict';
3030

3131
/**
@@ -37,12 +37,12 @@
3737
* Constructs a new Auth.
3838
* @alias module:api/Auth
3939
* @class
40-
* @param {module:ApiClient} apiClient Optional API client implementation to use,
41-
* default to {@link module:ApiClient#instance} if unspecified.
40+
* @param {module:Sdk} sdk Optional SDK implementation to use,
41+
* default to {@link module:Sdk#instance} if unspecified.
4242
*/
4343

44-
var exports = function(apiClient) {
45-
this.apiClient = apiClient || ApiClient.instance;
44+
var exports = function(sdk) {
45+
this.sdk = sdk || Sdk.instance;
4646

4747
/**
4848
* @param {String} username of the user logging in
@@ -67,7 +67,7 @@
6767
throw new Error("Missing the required parameter 'scope' when calling Login");
6868
}
6969

70-
var postBody = 'grant_type=password&scope=' + this.apiClient.buildCollectionParam(scope, 'plus') + '&client_id=' + clientID + '&username=' + username + '&password=' + password;
70+
var postBody = 'grant_type=password&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_id=' + clientID + '&username=' + username + '&password=' + password;
7171

7272
var pathParams = {};
7373
var queryParams = {};
@@ -79,7 +79,7 @@
7979
var accepts = ['application/json'];
8080
var returnType = AccessToken;
8181

82-
return this.apiClient.callAuth(
82+
return this.sdk.callAuth(
8383
'/oauth/token', 'POST',
8484
pathParams, queryParams, headerParams, formParams, postBody,
8585
authNames, contentTypes, accepts, returnType
@@ -114,7 +114,7 @@
114114
throw new Error("Missing the required parameter 'scope' when calling ElevatedLogin");
115115
}
116116

117-
var postBody = 'grant_type=password&scope=' + this.apiClient.buildCollectionParam(scope, 'plus') + '&client_secret=' + clientSecret + '&client_id=' + clientID + '&username=' + username + '&password=' + password;
117+
var postBody = 'grant_type=password&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_secret=' + clientSecret + '&client_id=' + clientID + '&username=' + username + '&password=' + password;
118118

119119
var pathParams = {};
120120
var queryParams = {};
@@ -126,7 +126,7 @@
126126
var accepts = ['application/json'];
127127
var returnType = AccessToken;
128128

129-
return this.apiClient.callAuth(
129+
return this.sdk.callAuth(
130130
'/oauth/token', 'POST',
131131
pathParams, queryParams, headerParams, formParams, postBody,
132132
authNames, contentTypes, accepts, returnType
@@ -151,7 +151,7 @@
151151
throw new Error("Missing the required parameter 'scope' when calling ElevatedLogin");
152152
}
153153

154-
var postBody = 'grant_type=client_credentials&scope=' + this.apiClient.buildCollectionParam(scope, 'plus') + '&client_secret=' + clientSecret + '&client_id=' + clientID;
154+
var postBody = 'grant_type=client_credentials&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_secret=' + clientSecret + '&client_id=' + clientID;
155155

156156
var pathParams = {};
157157
var queryParams = {};
@@ -163,7 +163,7 @@
163163
var accepts = ['application/json'];
164164
var returnType = AccessToken;
165165

166-
return this.apiClient.callAuth(
166+
return this.sdk.callAuth(
167167
'/oauth/token', 'POST',
168168
pathParams, queryParams, headerParams, formParams, postBody,
169169
authNames, contentTypes, accepts, returnType
@@ -188,7 +188,7 @@
188188
throw new Error("Missing the required parameter 'scope' when calling RefreshToken");
189189
}
190190

191-
var postBody = 'grant_type=refresh_token&scope=' + this.apiClient.buildCollectionParam(scope, 'plus') + '&refresh_token=' + refreshToken + '&client_id=' + clientID;
191+
var postBody = 'grant_type=refresh_token&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&refresh_token=' + refreshToken + '&client_id=' + clientID;
192192

193193
var pathParams = {};
194194
var queryParams = {};
@@ -200,7 +200,7 @@
200200
var accepts = ['application/json'];
201201
var returnType = AccessToken;
202202

203-
return this.apiClient.callAuth(
203+
return this.sdk.callAuth(
204204
'/oauth/token', 'POST',
205205
pathParams, queryParams, headerParams, formParams, postBody,
206206
authNames, contentTypes, accepts, returnType
@@ -220,7 +220,7 @@
220220
throw new Error("Missing the required parameter 'scope' when calling RefreshToken");
221221
}
222222

223-
var postBody = 'grant_type=client_credentials&scope=' + this.apiClient.buildCollectionParam(scope, 'plus') + '&client_id=' + clientID;
223+
var postBody = 'grant_type=client_credentials&scope=' + this.sdk.buildCollectionParam(scope, 'plus') + '&client_id=' + clientID;
224224

225225
var pathParams = {};
226226
var queryParams = {};
@@ -232,7 +232,7 @@
232232
var accepts = ['application/json'];
233233
var returnType = AccessToken;
234234

235-
return this.apiClient.callAuth(
235+
return this.sdk.callAuth(
236236
'/oauth/token', 'POST',
237237
pathParams, queryParams, headerParams, formParams, postBody,
238238
authNames, contentTypes, accepts, returnType

0 commit comments

Comments
 (0)