Skip to content

Commit 5987927

Browse files
author
Hari
committed
Integrated model name changes
1 parent 86dbc5a commit 5987927

File tree

194 files changed

+19951
-1091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+19951
-1091
lines changed

src/ApiClient.js

+17-3
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@
475475
request.type('application/json');
476476
}
477477

478-
479-
478+
479+
480480
if (contentType === 'application/x-www-form-urlencoded') {
481481
request.send(querystring.stringify(this.normalizeParams(formParams)));
482482
} else if (contentType == 'multipart/form-data') {
@@ -498,6 +498,20 @@
498498
var accept = this.jsonPreferredMime(accepts);
499499
if (accept) {
500500
request.accept(accept);
501+
/* Code for downloading file from stream */
502+
if (accept === 'application/xml') {
503+
var fs = require('fs');
504+
var path = require('path');
505+
var fileName;
506+
if (queryParams['reportName'])
507+
fileName = queryParams['reportName'] + '.xml';
508+
else
509+
fileName = "FileIdentifier.csv";
510+
var filePath = path.join(this.merchantConfig.getKeysDirectory(), fileName);
511+
var stream = fs.createWriteStream(path.resolve(filePath));
512+
request.send().pipe(stream);
513+
request._endCalled = false;
514+
}
501515
}
502516

503517
if (returnType === 'Blob') {
@@ -537,7 +551,7 @@
537551
};
538552

539553
/**
540-
*
554+
* @ghari
541555
* Build request target required for the signature generation
542556
* @param {String} path
543557
* @param {Object} pathParams

src/api/CaptureApi.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
(function(root, factory) {
1717
if (typeof define === 'function' && define.amd) {
1818
// AMD. Register as an anonymous module.
19-
define(['ApiClient', 'model/CapturePaymentRequest', 'model/InlineResponse2012', 'model/InlineResponse4002', 'model/InlineResponse502'], factory);
19+
define(['ApiClient', 'model/CapturePaymentRequest', 'model/PtsV2PaymentsCapturesPost201Response', 'model/PtsV2PaymentsCapturesPost400Response', 'model/PtsV2PaymentsPost502Response'], factory);
2020
} else if (typeof module === 'object' && module.exports) {
2121
// CommonJS-like environments that support module.exports, like Node.
22-
module.exports = factory(require('../ApiClient'), require('../model/CapturePaymentRequest'), require('../model/InlineResponse2012'), require('../model/InlineResponse4002'), require('../model/InlineResponse502'));
22+
module.exports = factory(require('../ApiClient'), require('../model/CapturePaymentRequest'), require('../model/PtsV2PaymentsCapturesPost201Response'), require('../model/PtsV2PaymentsCapturesPost400Response'), require('../model/PtsV2PaymentsPost502Response'));
2323
} else {
2424
// Browser globals (root is window)
2525
if (!root.CyberSource) {
2626
root.CyberSource = {};
2727
}
28-
root.CyberSource.CaptureApi = factory(root.CyberSource.ApiClient, root.CyberSource.CapturePaymentRequest, root.CyberSource.InlineResponse2012, root.CyberSource.InlineResponse4002, root.CyberSource.InlineResponse502);
28+
root.CyberSource.CaptureApi = factory(root.CyberSource.ApiClient, root.CyberSource.CapturePaymentRequest, root.CyberSource.PtsV2PaymentsCapturesPost201Response, root.CyberSource.PtsV2PaymentsCapturesPost400Response, root.CyberSource.PtsV2PaymentsPost502Response);
2929
}
30-
}(this, function(ApiClient, CapturePaymentRequest, InlineResponse2012, InlineResponse4002, InlineResponse502) {
30+
}(this, function(ApiClient, CapturePaymentRequest, PtsV2PaymentsCapturesPost201Response, PtsV2PaymentsCapturesPost400Response, PtsV2PaymentsPost502Response) {
3131
'use strict';
3232

3333
/**
@@ -43,7 +43,7 @@
4343
* @param {module:ApiClient} apiClient Optional API client implementation to use,
4444
* default to {@link module:ApiClient#instance} if unspecified.
4545
*/
46-
var exports = function(configObject, apiClient = undefined) {
46+
var exports = function(configObject, apiClient = undefined) {
4747
this.apiClient = apiClient || ApiClient.instance;
4848

4949
this.apiClient.setConfiguration(configObject);
@@ -53,7 +53,7 @@
5353
* Callback function to receive the result of the capturePayment operation.
5454
* @callback module:api/CaptureApi~capturePaymentCallback
5555
* @param {String} error Error message, if any.
56-
* @param {module:model/InlineResponse2012} data The data returned by the service call.
56+
* @param {module:model/PtsV2PaymentsCapturesPost201Response} data The data returned by the service call.
5757
* @param {String} response The complete HTTP response.
5858
*/
5959

@@ -63,7 +63,7 @@
6363
* @param {module:model/CapturePaymentRequest} capturePaymentRequest
6464
* @param {String} id The payment ID returned from a previous payment request. This ID links the capture to the payment.
6565
* @param {module:api/CaptureApi~capturePaymentCallback} callback The callback function, accepting three arguments: error, data, response
66-
* data is of type: {@link module:model/InlineResponse2012}
66+
* data is of type: {@link module:model/PtsV2PaymentsCapturesPost201Response}
6767
*/
6868
this.capturePayment = function(capturePaymentRequest, id, callback) {
6969
var postBody = capturePaymentRequest;
@@ -92,7 +92,7 @@
9292
var authNames = [];
9393
var contentTypes = ['application/json'];
9494
var accepts = ['application/hal+json;charset=utf-8'];
95-
var returnType = InlineResponse2012;
95+
var returnType = PtsV2PaymentsCapturesPost201Response;
9696

9797
return this.apiClient.callApi(
9898
'/pts/v2/payments/{id}/captures', 'POST',

src/api/CreditApi.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
(function(root, factory) {
1717
if (typeof define === 'function' && define.amd) {
1818
// AMD. Register as an anonymous module.
19-
define(['ApiClient', 'model/CreateCreditRequest', 'model/InlineResponse2014', 'model/InlineResponse4003', 'model/InlineResponse502'], factory);
19+
define(['ApiClient', 'model/CreateCreditRequest', 'model/PtsV2CreditsPost201Response', 'model/PtsV2PaymentsPost502Response', 'model/PtsV2PaymentsRefundPost400Response'], factory);
2020
} else if (typeof module === 'object' && module.exports) {
2121
// CommonJS-like environments that support module.exports, like Node.
22-
module.exports = factory(require('../ApiClient'), require('../model/CreateCreditRequest'), require('../model/InlineResponse2014'), require('../model/InlineResponse4003'), require('../model/InlineResponse502'));
22+
module.exports = factory(require('../ApiClient'), require('../model/CreateCreditRequest'), require('../model/PtsV2CreditsPost201Response'), require('../model/PtsV2PaymentsPost502Response'), require('../model/PtsV2PaymentsRefundPost400Response'));
2323
} else {
2424
// Browser globals (root is window)
2525
if (!root.CyberSource) {
2626
root.CyberSource = {};
2727
}
28-
root.CyberSource.CreditApi = factory(root.CyberSource.ApiClient, root.CyberSource.CreateCreditRequest, root.CyberSource.InlineResponse2014, root.CyberSource.InlineResponse4003, root.CyberSource.InlineResponse502);
28+
root.CyberSource.CreditApi = factory(root.CyberSource.ApiClient, root.CyberSource.CreateCreditRequest, root.CyberSource.PtsV2CreditsPost201Response, root.CyberSource.PtsV2PaymentsPost502Response, root.CyberSource.PtsV2PaymentsRefundPost400Response);
2929
}
30-
}(this, function(ApiClient, CreateCreditRequest, InlineResponse2014, InlineResponse4003, InlineResponse502) {
30+
}(this, function(ApiClient, CreateCreditRequest, PtsV2CreditsPost201Response, PtsV2PaymentsPost502Response, PtsV2PaymentsRefundPost400Response) {
3131
'use strict';
3232

3333
/**
@@ -43,7 +43,7 @@
4343
* @param {module:ApiClient} apiClient Optional API client implementation to use,
4444
* default to {@link module:ApiClient#instance} if unspecified.
4545
*/
46-
var exports = function(configObject, apiClient = undefined) {
46+
var exports = function(configObject, apiClient = undefined) {
4747
this.apiClient = apiClient || ApiClient.instance;
4848

4949
this.apiClient.setConfiguration(configObject);
@@ -53,7 +53,7 @@
5353
* Callback function to receive the result of the createCredit operation.
5454
* @callback module:api/CreditApi~createCreditCallback
5555
* @param {String} error Error message, if any.
56-
* @param {module:model/InlineResponse2014} data The data returned by the service call.
56+
* @param {module:model/PtsV2CreditsPost201Response} data The data returned by the service call.
5757
* @param {String} response The complete HTTP response.
5858
*/
5959

@@ -62,7 +62,7 @@
6262
* POST to the credit resource to credit funds to a specified credit card.
6363
* @param {module:model/CreateCreditRequest} createCreditRequest
6464
* @param {module:api/CreditApi~createCreditCallback} callback The callback function, accepting three arguments: error, data, response
65-
* data is of type: {@link module:model/InlineResponse2014}
65+
* data is of type: {@link module:model/PtsV2CreditsPost201Response}
6666
*/
6767
this.createCredit = function(createCreditRequest, callback) {
6868
var postBody = createCreditRequest;
@@ -85,7 +85,7 @@
8585
var authNames = [];
8686
var contentTypes = ['application/json'];
8787
var accepts = ['application/hal+json;charset=utf-8'];
88-
var returnType = InlineResponse2014;
88+
var returnType = PtsV2CreditsPost201Response;
8989

9090
return this.apiClient.callApi(
9191
'/pts/v2/credits/', 'POST',

src/api/FlexTokenApi.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
(function(root, factory) {
1717
if (typeof define === 'function' && define.amd) {
1818
// AMD. Register as an anonymous module.
19-
define(['ApiClient', 'model/InlineResponse2001', 'model/InlineResponseDefault', 'model/TokenizeRequest'], factory);
19+
define(['ApiClient', 'model/FlexV1TokensPost200Response', 'model/InlineResponseDefault', 'model/TokenizeRequest'], factory);
2020
} else if (typeof module === 'object' && module.exports) {
2121
// CommonJS-like environments that support module.exports, like Node.
22-
module.exports = factory(require('../ApiClient'), require('../model/InlineResponse2001'), require('../model/InlineResponseDefault'), require('../model/TokenizeRequest'));
22+
module.exports = factory(require('../ApiClient'), require('../model/FlexV1TokensPost200Response'), require('../model/InlineResponseDefault'), require('../model/TokenizeRequest'));
2323
} else {
2424
// Browser globals (root is window)
2525
if (!root.CyberSource) {
2626
root.CyberSource = {};
2727
}
28-
root.CyberSource.FlexTokenApi = factory(root.CyberSource.ApiClient, root.CyberSource.InlineResponse2001, root.CyberSource.InlineResponseDefault, root.CyberSource.TokenizeRequest);
28+
root.CyberSource.FlexTokenApi = factory(root.CyberSource.ApiClient, root.CyberSource.FlexV1TokensPost200Response, root.CyberSource.InlineResponseDefault, root.CyberSource.TokenizeRequest);
2929
}
30-
}(this, function(ApiClient, InlineResponse2001, InlineResponseDefault, TokenizeRequest) {
30+
}(this, function(ApiClient, FlexV1TokensPost200Response, InlineResponseDefault, TokenizeRequest) {
3131
'use strict';
3232

3333
/**
@@ -43,7 +43,7 @@
4343
* @param {module:ApiClient} apiClient Optional API client implementation to use,
4444
* default to {@link module:ApiClient#instance} if unspecified.
4545
*/
46-
var exports = function(configObject, apiClient = undefined) {
46+
var exports = function(configObject, apiClient = undefined) {
4747
this.apiClient = apiClient || ApiClient.instance;
4848

4949
this.apiClient.setConfiguration(configObject);
@@ -53,7 +53,7 @@
5353
* Callback function to receive the result of the tokenize operation.
5454
* @callback module:api/FlexTokenApi~tokenizeCallback
5555
* @param {String} error Error message, if any.
56-
* @param {module:model/InlineResponse2001} data The data returned by the service call.
56+
* @param {module:model/FlexV1TokensPost200Response} data The data returned by the service call.
5757
* @param {String} response The complete HTTP response.
5858
*/
5959

@@ -63,7 +63,7 @@
6363
* @param {Object} opts Optional parameters
6464
* @param {module:model/TokenizeRequest} opts.tokenizeRequest
6565
* @param {module:api/FlexTokenApi~tokenizeCallback} callback The callback function, accepting three arguments: error, data, response
66-
* data is of type: {@link module:model/InlineResponse2001}
66+
* data is of type: {@link module:model/FlexV1TokensPost200Response}
6767
*/
6868
this.tokenize = function(opts, callback) {
6969
opts = opts || {};
@@ -82,7 +82,7 @@
8282
var authNames = [];
8383
var contentTypes = ['application/json;charset=utf-8'];
8484
var accepts = ['application/json'];
85-
var returnType = InlineResponse2001;
85+
var returnType = FlexV1TokensPost200Response;
8686

8787
return this.apiClient.callApi(
8888
'/flex/v1/tokens/', 'POST',

src/api/InstrumentIdentifierApi.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
(function(root, factory) {
1717
if (typeof define === 'function' && define.amd) {
1818
// AMD. Register as an anonymous module.
19-
define(['ApiClient', 'model/Body1', 'model/InlineResponse20010', 'model/InlineResponse4008', 'model/InlineResponse409'], factory);
19+
define(['ApiClient', 'model/Body1', 'model/InlineResponse400', 'model/TmsV1InstrumentidentifiersDelete409Response', 'model/TmsV1InstrumentidentifiersPost200Response'], factory);
2020
} else if (typeof module === 'object' && module.exports) {
2121
// CommonJS-like environments that support module.exports, like Node.
22-
module.exports = factory(require('../ApiClient'), require('../model/Body1'), require('../model/InlineResponse20010'), require('../model/InlineResponse4008'), require('../model/InlineResponse409'));
22+
module.exports = factory(require('../ApiClient'), require('../model/Body1'), require('../model/InlineResponse400'), require('../model/TmsV1InstrumentidentifiersDelete409Response'), require('../model/TmsV1InstrumentidentifiersPost200Response'));
2323
} else {
2424
// Browser globals (root is window)
2525
if (!root.CyberSource) {
2626
root.CyberSource = {};
2727
}
28-
root.CyberSource.InstrumentIdentifierApi = factory(root.CyberSource.ApiClient, root.CyberSource.Body1, root.CyberSource.InlineResponse20010, root.CyberSource.InlineResponse4008, root.CyberSource.InlineResponse409);
28+
root.CyberSource.InstrumentIdentifierApi = factory(root.CyberSource.ApiClient, root.CyberSource.Body1, root.CyberSource.InlineResponse400, root.CyberSource.TmsV1InstrumentidentifiersDelete409Response, root.CyberSource.TmsV1InstrumentidentifiersPost200Response);
2929
}
30-
}(this, function(ApiClient, Body1, InlineResponse20010, InlineResponse4008, InlineResponse409) {
30+
}(this, function(ApiClient, Body1, InlineResponse400, TmsV1InstrumentidentifiersDelete409Response, TmsV1InstrumentidentifiersPost200Response) {
3131
'use strict';
3232

3333
/**
@@ -43,7 +43,7 @@
4343
* @param {module:ApiClient} apiClient Optional API client implementation to use,
4444
* default to {@link module:ApiClient#instance} if unspecified.
4545
*/
46-
var exports = function(configObject, apiClient = undefined) {
46+
var exports = function(configObject, apiClient = undefined) {
4747
this.apiClient = apiClient || ApiClient.instance;
4848

4949
this.apiClient.setConfiguration(configObject);
@@ -104,7 +104,7 @@
104104
* Callback function to receive the result of the tmsV1InstrumentidentifiersTokenIdGet operation.
105105
* @callback module:api/InstrumentIdentifierApi~tmsV1InstrumentidentifiersTokenIdGetCallback
106106
* @param {String} error Error message, if any.
107-
* @param {module:model/InlineResponse20010} data The data returned by the service call.
107+
* @param {module:model/TmsV1InstrumentidentifiersPost200Response} data The data returned by the service call.
108108
* @param {String} response The complete HTTP response.
109109
*/
110110

@@ -113,7 +113,7 @@
113113
* @param {String} profileId The id of a profile containing user specific TMS configuration.
114114
* @param {String} tokenId The TokenId of an Instrument Identifier.
115115
* @param {module:api/InstrumentIdentifierApi~tmsV1InstrumentidentifiersTokenIdGetCallback} callback The callback function, accepting three arguments: error, data, response
116-
* data is of type: {@link module:model/InlineResponse20010}
116+
* data is of type: {@link module:model/TmsV1InstrumentidentifiersPost200Response}
117117
*/
118118
this.tmsV1InstrumentidentifiersTokenIdGet = function(profileId, tokenId, callback) {
119119
var postBody = null;
@@ -143,7 +143,7 @@
143143
var authNames = [];
144144
var contentTypes = ['application/json;charset=utf-8'];
145145
var accepts = ['application/json;charset=utf-8'];
146-
var returnType = InlineResponse20010;
146+
var returnType = TmsV1InstrumentidentifiersPost200Response;
147147

148148
return this.apiClient.callApi(
149149
'/tms/v1/instrumentidentifiers/{tokenId}', 'GET',
@@ -156,7 +156,7 @@
156156
* Callback function to receive the result of the tmsV1InstrumentidentifiersTokenIdPatch operation.
157157
* @callback module:api/InstrumentIdentifierApi~tmsV1InstrumentidentifiersTokenIdPatchCallback
158158
* @param {String} error Error message, if any.
159-
* @param {module:model/InlineResponse20010} data The data returned by the service call.
159+
* @param {module:model/TmsV1InstrumentidentifiersPost200Response} data The data returned by the service call.
160160
* @param {String} response The complete HTTP response.
161161
*/
162162

@@ -166,7 +166,7 @@
166166
* @param {String} tokenId The TokenId of an Instrument Identifier.
167167
* @param {module:model/Body1} body Please specify the previous transaction Id to update.
168168
* @param {module:api/InstrumentIdentifierApi~tmsV1InstrumentidentifiersTokenIdPatchCallback} callback The callback function, accepting three arguments: error, data, response
169-
* data is of type: {@link module:model/InlineResponse20010}
169+
* data is of type: {@link module:model/TmsV1InstrumentidentifiersPost200Response}
170170
*/
171171
this.tmsV1InstrumentidentifiersTokenIdPatch = function(profileId, tokenId, body, callback) {
172172
var postBody = body;
@@ -201,7 +201,7 @@
201201
var authNames = [];
202202
var contentTypes = ['application/json;charset=utf-8'];
203203
var accepts = ['application/json;charset=utf-8'];
204-
var returnType = InlineResponse20010;
204+
var returnType = TmsV1InstrumentidentifiersPost200Response;
205205

206206
return this.apiClient.callApi(
207207
'/tms/v1/instrumentidentifiers/{tokenId}', 'PATCH',

0 commit comments

Comments
 (0)