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

Commit cb3fbd0

Browse files
author
Ingenico ePayments
committed
Release 2.19.0.
1 parent c074346 commit cb3fbd0

File tree

7 files changed

+211
-2
lines changed

7 files changed

+211
-2
lines changed

hostedmandatemanagements/create.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/hostedmandatemanagement/CreateHostedMandateManagementRequest.json');
10+
11+
var myModule = function (merchantId, 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 + '/hostedmandatemanagements',
24+
body: postData,
25+
paymentContext: paymentContext,
26+
cb: cb
27+
});
28+
}
29+
30+
module.exports = myModule;

hostedmandatemanagements/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, hostedMandateManagementId, paymentContext, cb) {
9+
communicator({
10+
method: 'GET',
11+
modulePath: '/v1/' + merchantId + '/hostedmandatemanagements/' + hostedMandateManagementId,
12+
body: null,
13+
paymentContext: paymentContext,
14+
cb: cb
15+
});
16+
}
17+
18+
module.exports = myModule;

hostedmandatemanagements/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['create'] = require('./create');
9+
// console.log(`Added create to module space`);
10+
modules['get'] = require('./get');
11+
// console.log(`Added get to module space`);
12+
13+
module.exports = modules;

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var sdkcontext = require('./utils/context');
99
var communicator = require('./utils/communicator');
1010

1111
var hostedcheckouts = require('./hostedcheckouts');
12+
var hostedmandatemanagements = require('./hostedmandatemanagements');
1213
var payments = require('./payments');
1314
var captures = require('./captures');
1415
var refunds = require('./refunds');
@@ -83,6 +84,7 @@ var wrapper = {
8384
return wrapper;
8485
},
8586
hostedcheckouts: hostedcheckouts,
87+
hostedmandatemanagements: hostedmandatemanagements,
8688
payments: payments,
8789
captures: captures,
8890
refunds: refunds,

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.18.0",
3+
"version": "2.19.0",
44
"description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",
55
"dependencies": {
66
"dateformat": "^1.0.12",
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
{
2+
"$schema" : "http://json-schema.org/draft-04/schema#",
3+
"type" : "object",
4+
"properties" : {
5+
"createMandateInfo" : {
6+
"$ref" : "#/definitions/HostedMandateInfo"
7+
},
8+
"hostedMandateManagementSpecificInput" : {
9+
"$ref" : "#/definitions/HostedMandateManagementSpecificInput"
10+
}
11+
},
12+
"required" : [ "createMandateInfo" ],
13+
"additionalProperties" : false,
14+
"definitions" : {
15+
"BankAccountIban" : {
16+
"type" : "object",
17+
"properties" : {
18+
"accountHolderName" : {
19+
"type" : "string"
20+
},
21+
"iban" : {
22+
"type" : "string"
23+
}
24+
},
25+
"additionalProperties" : false
26+
},
27+
"HostedMandateInfo" : {
28+
"type" : "object",
29+
"properties" : {
30+
"alias" : {
31+
"type" : "string"
32+
},
33+
"customer" : {
34+
"$ref" : "#/definitions/MandateCustomer"
35+
},
36+
"customerReference" : {
37+
"type" : "string"
38+
},
39+
"recurrenceType" : {
40+
"type" : "string"
41+
},
42+
"signatureType" : {
43+
"type" : "string"
44+
},
45+
"uniqueMandateReference" : {
46+
"type" : "string"
47+
}
48+
},
49+
"required" : [ "customerReference", "recurrenceType", "signatureType" ],
50+
"additionalProperties" : false
51+
},
52+
"HostedMandateManagementSpecificInput" : {
53+
"type" : "object",
54+
"properties" : {
55+
"locale" : {
56+
"type" : "string"
57+
},
58+
"returnUrl" : {
59+
"type" : "string"
60+
},
61+
"showResultPage" : {
62+
"type" : "boolean"
63+
},
64+
"variant" : {
65+
"type" : "string"
66+
}
67+
},
68+
"additionalProperties" : false
69+
},
70+
"MandateAddress" : {
71+
"type" : "object",
72+
"properties" : {
73+
"city" : {
74+
"type" : "string"
75+
},
76+
"countryCode" : {
77+
"type" : "string"
78+
},
79+
"houseNumber" : {
80+
"type" : "string"
81+
},
82+
"street" : {
83+
"type" : "string"
84+
},
85+
"zip" : {
86+
"type" : "string"
87+
}
88+
},
89+
"additionalProperties" : false
90+
},
91+
"MandateContactDetails" : {
92+
"type" : "object",
93+
"properties" : {
94+
"emailAddress" : {
95+
"type" : "string"
96+
}
97+
},
98+
"additionalProperties" : false
99+
},
100+
"MandateCustomer" : {
101+
"type" : "object",
102+
"properties" : {
103+
"bankAccountIban" : {
104+
"$ref" : "#/definitions/BankAccountIban"
105+
},
106+
"companyName" : {
107+
"type" : "string"
108+
},
109+
"contactDetails" : {
110+
"$ref" : "#/definitions/MandateContactDetails"
111+
},
112+
"mandateAddress" : {
113+
"$ref" : "#/definitions/MandateAddress"
114+
},
115+
"personalInformation" : {
116+
"$ref" : "#/definitions/MandatePersonalInformation"
117+
}
118+
},
119+
"additionalProperties" : false
120+
},
121+
"MandatePersonalInformation" : {
122+
"type" : "object",
123+
"properties" : {
124+
"name" : {
125+
"$ref" : "#/definitions/MandatePersonalName"
126+
},
127+
"title" : {
128+
"type" : "string"
129+
}
130+
},
131+
"additionalProperties" : false
132+
},
133+
"MandatePersonalName" : {
134+
"type" : "object",
135+
"properties" : {
136+
"firstName" : {
137+
"type" : "string"
138+
},
139+
"surname" : {
140+
"type" : "string"
141+
}
142+
},
143+
"additionalProperties" : false
144+
}
145+
}
146+
}

utils/headers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var serverMetaInfo = function (sdkContext) {
99
key: "X-GCS-ServerMetaInfo",
1010
value: {
1111
'sdkCreator': 'Ingenico',
12-
'sdkIdentifier': 'NodejsServerSDK/v2.18.0',
12+
'sdkIdentifier': 'NodejsServerSDK/v2.19.0',
1313
'platformIdentifier': process.env['OS'] + ' Node.js/' + process.versions.node
1414
}
1515
};

0 commit comments

Comments
 (0)