Skip to content

Commit

Permalink
Merge pull request #119 from CyberSource/test-axios
Browse files Browse the repository at this point in the history
Switch to axios package
  • Loading branch information
monu-kumar-visa authored Nov 17, 2023
2 parents 1189dfa + 6fc9d0a commit 2d99d6e
Show file tree
Hide file tree
Showing 42 changed files with 365 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generator/cybersource-javascript-template/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
throw new Error("Missing the required parameter '<paramName>' when calling <operationId>");
}
</required></allParams>
<#bodyParam>
var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, '<&vendorExtensions.x-jsdoc-type>', this.apiClient.merchantConfig.runEnvironment);
</bodyParam>

var pathParams = {<#pathParams>
'<baseName>': <#required><paramName></required><^required>opts['<paramName>']</required><#hasMore>,</hasMore></pathParams>
Expand Down
1 change: 1 addition & 0 deletions generator/cybersource-javascript-template/index.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,6 @@
exports.SensitiveDataMasker = require('./authentication/logging/SensitiveDataMasker.js');
exports.ExternalLoggerWrapper = require('./authentication/logging/ExternalLoggerWrapper.js');
exports.JWEUtility = require('./utilities/JWEUtility.js');
exports.SdkTracker = require('./utilities/tracking/SdkTracker.js')
return exports;<={{ }}=>
}));
12 changes: 12 additions & 0 deletions src/api/AsymmetricKeyManagementApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
throw new Error("Missing the required parameter 'createP12KeysRequest' when calling createP12Keys");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CreateP12KeysRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down Expand Up @@ -117,6 +121,10 @@
throw new Error("Missing the required parameter 'deleteBulkP12KeysRequest' when calling deleteBulkP12Keys");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/DeleteBulkP12KeysRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down Expand Up @@ -217,6 +225,10 @@
throw new Error("Missing the required parameter 'updateAsymKeysRequest' when calling updateAsymKey");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/UpdateAsymKeysRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'keyId': keyId
Expand Down
4 changes: 4 additions & 0 deletions src/api/BatchesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@
throw new Error("Missing the required parameter 'body' when calling postBatch");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/Body', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
12 changes: 12 additions & 0 deletions src/api/BillingAgreementsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
throw new Error("Missing the required parameter 'id' when calling billingAgreementsDeRegistration");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/ModifyBillingAgreement', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down Expand Up @@ -130,6 +134,10 @@
throw new Error("Missing the required parameter 'id' when calling billingAgreementsIntimation");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/IntimateBillingAgreement', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down Expand Up @@ -176,6 +184,10 @@
throw new Error("Missing the required parameter 'createBillingAgreement' when calling billingAgreementsRegistration");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CreateBillingAgreement', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
4 changes: 4 additions & 0 deletions src/api/CaptureApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
throw new Error("Missing the required parameter 'id' when calling capturePayment");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CapturePaymentRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down
8 changes: 8 additions & 0 deletions src/api/CreateNewWebhooksApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
opts = opts || {};
var postBody = opts['createWebhook'];

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CreateWebhook', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down Expand Up @@ -177,6 +181,10 @@
throw new Error("Missing the required parameter 'vCPermissions' when calling saveSymEgressKey");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/SaveSymEgressKey', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
4 changes: 4 additions & 0 deletions src/api/CreditApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
throw new Error("Missing the required parameter 'createCreditRequest' when calling createCredit");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CreateCreditRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
8 changes: 8 additions & 0 deletions src/api/CustomerApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
throw new Error("Missing the required parameter 'patchCustomerRequest' when calling patchCustomer");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PatchCustomerRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'customerId': customerId
Expand Down Expand Up @@ -238,6 +242,10 @@
throw new Error("Missing the required parameter 'postCustomerRequest' when calling postCustomer");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PostCustomerRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
8 changes: 8 additions & 0 deletions src/api/CustomerPaymentInstrumentApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@
throw new Error("Missing the required parameter 'patchCustomerPaymentInstrumentRequest' when calling patchCustomersPaymentInstrument");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PatchCustomerPaymentInstrumentRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'customerId': customerId,
Expand Down Expand Up @@ -322,6 +326,10 @@
throw new Error("Missing the required parameter 'postCustomerPaymentInstrumentRequest' when calling postCustomerPaymentInstrument");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PostCustomerPaymentInstrumentRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'customerId': customerId
Expand Down
8 changes: 8 additions & 0 deletions src/api/CustomerShippingAddressApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@
throw new Error("Missing the required parameter 'patchCustomerShippingAddressRequest' when calling patchCustomersShippingAddress");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PatchCustomerShippingAddressRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'customerId': customerId,
Expand Down Expand Up @@ -322,6 +326,10 @@
throw new Error("Missing the required parameter 'postCustomerShippingAddressRequest' when calling postCustomerShippingAddress");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PostCustomerShippingAddressRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'customerId': customerId
Expand Down
20 changes: 20 additions & 0 deletions src/api/DecisionManagerApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
throw new Error("Missing the required parameter 'caseManagementActionsRequest' when calling actionDecisionManagerCase");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CaseManagementActionsRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down Expand Up @@ -130,6 +134,10 @@
throw new Error("Missing the required parameter 'addNegativeListRequest' when calling addNegative");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/AddNegativeListRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'type': type
Expand Down Expand Up @@ -182,6 +190,10 @@
throw new Error("Missing the required parameter 'caseManagementCommentsRequest' when calling commentDecisionManagerCase");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CaseManagementCommentsRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down Expand Up @@ -228,6 +240,10 @@
throw new Error("Missing the required parameter 'createBundledDecisionManagerCaseRequest' when calling createBundledDecisionManagerCase");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CreateBundledDecisionManagerCaseRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down Expand Up @@ -279,6 +295,10 @@
throw new Error("Missing the required parameter 'fraudMarkingActionRequest' when calling fraudUpdate");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/FraudMarkingActionRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down
4 changes: 4 additions & 0 deletions src/api/EMVTagDetailsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
throw new Error("Missing the required parameter 'body' when calling parseEmvTags");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/Body', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
12 changes: 12 additions & 0 deletions src/api/InstrumentIdentifierApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@
throw new Error("Missing the required parameter 'patchInstrumentIdentifierRequest' when calling patchInstrumentIdentifier");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PatchInstrumentIdentifierRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'instrumentIdentifierId': instrumentIdentifierId
Expand Down Expand Up @@ -295,6 +299,10 @@
throw new Error("Missing the required parameter 'postInstrumentIdentifierRequest' when calling postInstrumentIdentifier");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PostInstrumentIdentifierRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down Expand Up @@ -349,6 +357,10 @@
throw new Error("Missing the required parameter 'postInstrumentIdentifierEnrollmentRequest' when calling postInstrumentIdentifierEnrollment");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/PostInstrumentIdentifierEnrollmentRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'instrumentIdentifierId': instrumentIdentifierId
Expand Down
4 changes: 4 additions & 0 deletions src/api/InvoiceSettingsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
throw new Error("Missing the required parameter 'invoiceSettingsRequest' when calling updateInvoiceSettings");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/InvoiceSettingsRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down
8 changes: 8 additions & 0 deletions src/api/InvoicesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
throw new Error("Missing the required parameter 'createInvoiceRequest' when calling createInvoice");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/CreateInvoiceRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
};
Expand Down Expand Up @@ -330,6 +334,10 @@
throw new Error("Missing the required parameter 'updateInvoiceRequest' when calling updateInvoice");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/UpdateInvoiceRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'id': id
Expand Down
4 changes: 4 additions & 0 deletions src/api/KeyManagementPasswordApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
throw new Error("Missing the required parameter 'updatePasswordKeysRequest' when calling updatePassword");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/UpdatePasswordKeysRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'keyId': keyId
Expand Down
4 changes: 4 additions & 0 deletions src/api/KeyManagementPgpApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
throw new Error("Missing the required parameter 'updatePGPKeysRequest' when calling updatePGP");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/UpdatePGPKeysRequest', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'keyId': keyId
Expand Down
4 changes: 4 additions & 0 deletions src/api/KeyManagementScmpApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
throw new Error("Missing the required parameter 'updatePGPKeysRequest' when calling updateSCMP");
}

var SdkTracker = require('../utilities/tracking/SdkTracker');

var sdkTracker = new SdkTracker();
postBody = sdkTracker.insertDeveloperIdTracker(postBody, 'module:model/UpdatePGPKeysRequest1', this.apiClient.merchantConfig.runEnvironment);

var pathParams = {
'keyId': keyId
Expand Down
Loading

0 comments on commit 2d99d6e

Please sign in to comment.