Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 156a9f7

Browse files
author
Ingenico ePayments
committed
Release 2.25.0.
1 parent e487395 commit 156a9f7

File tree

13 files changed

+159
-3
lines changed

13 files changed

+159
-3
lines changed

disputes/get.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
/*
3+
* This file was auto-generated from the API references found at
4+
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
5+
*/
6+
var communicator = require('../utils/communicator');
7+
8+
var myModule = function (merchantId, disputeId, paymentContext, cb) {
9+
communicator({
10+
method: 'GET',
11+
modulePath: '/v1/' + merchantId + '/disputes/' + disputeId,
12+
body: null,
13+
paymentContext: paymentContext,
14+
cb: cb
15+
});
16+
}
17+
18+
module.exports = myModule;

disputes/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"use strict";
2+
/*
3+
* This file was auto-generated from the API references found at
4+
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
5+
*/
6+
var modules = {};
7+
8+
modules['get'] = require('./get');
9+
// console.log(`Added get to module space`);
10+
modules['submit'] = require('./submit');
11+
// console.log(`Added submit to module space`);
12+
13+
module.exports = modules;

disputes/submit.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
/*
3+
* This file was auto-generated from the API references found at
4+
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
5+
*/
6+
var communicator = require('../utils/communicator');
7+
8+
var myModule = function (merchantId, disputeId, paymentContext, cb) {
9+
communicator({
10+
method: 'POST',
11+
modulePath: '/v1/' + merchantId + '/disputes/' + disputeId + '/submit',
12+
body: null,
13+
paymentContext: paymentContext,
14+
cb: cb
15+
});
16+
}
17+
18+
module.exports = myModule;

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var hostedmandatemanagements = require('./hostedmandatemanagements');
1313
var payments = require('./payments');
1414
var captures = require('./captures');
1515
var refunds = require('./refunds');
16+
var disputes = require('./disputes');
1617
var payouts = require('./payouts');
1718
var productgroups = require('./productgroups');
1819
var products = require('./products');
@@ -88,6 +89,7 @@ var wrapper = {
8889
payments: payments,
8990
captures: captures,
9091
refunds: refunds,
92+
disputes: disputes,
9193
payouts: payouts,
9294
productgroups: productgroups,
9395
products: products,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "connect-sdk-nodejs",
3-
"version": "2.24.0",
3+
"version": "2.25.0",
44
"description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",
55
"dependencies": {
66
"dateformat": "^1.0.12",

payments/dispute.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"use strict";
2+
/*
3+
* This file was auto-generated from the API references found at
4+
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
5+
*/
6+
var validate = require('jsonschema').validate;
7+
var communicator = require('../utils/communicator');
8+
var sdkcontext = require('../utils/context');
9+
var requestSchema = require('../schemas/dispute/CreateDisputeRequest.json');
10+
11+
var myModule = function (merchantId, paymentId, postData, paymentContext, cb) {
12+
// validate postData
13+
var isValidRequest = validate(postData, requestSchema);
14+
if (!isValidRequest.valid) {
15+
var logger = sdkcontext.getLogger();
16+
if (sdkcontext.isLoggingEnabled()) {
17+
logger('error', isValidRequest.errors);
18+
}
19+
throw new Error(isValidRequest.errors);
20+
}
21+
communicator({
22+
method: 'POST',
23+
modulePath: '/v1/' + merchantId + '/payments/' + paymentId + '/dispute',
24+
body: postData,
25+
paymentContext: paymentContext,
26+
cb: cb
27+
});
28+
}
29+
30+
module.exports = myModule;

payments/disputes.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
/*
3+
* This file was auto-generated from the API references found at
4+
* https://epayments-api.developer-ingenico.com/s2sapi/v1/
5+
*/
6+
var communicator = require('../utils/communicator');
7+
8+
var myModule = function (merchantId, paymentId, paymentContext, cb) {
9+
communicator({
10+
method: 'GET',
11+
modulePath: '/v1/' + merchantId + '/payments/' + paymentId + '/disputes',
12+
body: null,
13+
paymentContext: paymentContext,
14+
cb: cb
15+
});
16+
}
17+
18+
module.exports = myModule;

payments/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ modules['refunds'] = require('./refunds');
3333
// console.log(`Added refunds to module space`);
3434
modules['cancel'] = require('./cancel');
3535
// console.log(`Added cancel to module space`);
36+
modules['dispute'] = require('./dispute');
37+
// console.log(`Added dispute to module space`);
38+
modules['disputes'] = require('./disputes');
39+
// console.log(`Added disputes to module space`);
3640

3741
module.exports = modules;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema" : "http://json-schema.org/draft-04/schema#",
3+
"type" : "object",
4+
"properties" : {
5+
"amountOfMoney" : {
6+
"$ref" : "#/definitions/AmountOfMoney"
7+
},
8+
"contactPerson" : {
9+
"type" : "string"
10+
},
11+
"emailAddress" : {
12+
"type" : "string"
13+
},
14+
"replyTo" : {
15+
"type" : "string"
16+
},
17+
"requestMessage" : {
18+
"type" : "string"
19+
}
20+
},
21+
"required" : [ "contactPerson", "emailAddress" ],
22+
"additionalProperties" : false,
23+
"definitions" : {
24+
"AmountOfMoney" : {
25+
"type" : "object",
26+
"properties" : {
27+
"amount" : {
28+
"type" : "integer",
29+
"maximum" : 9223372036854775807
30+
},
31+
"currencyCode" : {
32+
"type" : "string"
33+
}
34+
},
35+
"required" : [ "amount", "currencyCode" ],
36+
"additionalProperties" : false
37+
}
38+
}
39+
}

schemas/hostedcheckout/CreateHostedCheckoutRequest.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,9 @@
10271027
"type" : "integer",
10281028
"maximum" : 60
10291029
},
1030+
"paymentProduct840SpecificInput" : {
1031+
"$ref" : "#/definitions/RedirectPaymentProduct840SpecificInputBase"
1032+
},
10301033
"paymentProductId" : {
10311034
"type" : "integer",
10321035
"maximum" : 2147483647
@@ -1046,6 +1049,15 @@
10461049
},
10471050
"additionalProperties" : false
10481051
},
1052+
"RedirectPaymentProduct840SpecificInputBase" : {
1053+
"type" : "object",
1054+
"properties" : {
1055+
"addressSelectionAtPayPal" : {
1056+
"type" : "boolean"
1057+
}
1058+
},
1059+
"additionalProperties" : false
1060+
},
10491061
"Seller" : {
10501062
"type" : "object",
10511063
"properties" : {

0 commit comments

Comments
 (0)