connect-sdk-nodejs 4.14.0 → 4.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -15,6 +15,7 @@ const services = require("./services");
15
15
  const tokens = require("./tokens");
16
16
  const mandates = require("./mandates");
17
17
  const sessions = require("./sessions");
18
+ const installments = require("./installments");
18
19
  const files = require("./files");
19
20
  const webhooks = require("./webhooks");
20
21
  let _logger;
@@ -78,6 +79,7 @@ const connectSdk = {
78
79
  tokens: tokens,
79
80
  mandates: mandates,
80
81
  sessions: sessions,
82
+ installments: installments,
81
83
  files: files,
82
84
  context: sdkcontext,
83
85
  webhooks: webhooks,
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAMA,8CAA+C;AAC/C,+CAAgD;AAEhD,qDAAsD;AACtD,uEAAwE;AACxE,uCAAwC;AACxC,uCAAwC;AACxC,qCAAsC;AACtC,uCAAwC;AACxC,qCAAsC;AACtC,iDAAkD;AAClD,uCAAwC;AACxC,qDAAsD;AACtD,uCAAwC;AACxC,mCAAoC;AACpC,uCAAwC;AACxC,uCAAwC;AACxC,iCAAkC;AAElC,uCAAwC;AAExC,IAAI,OAAuC,CAAC;AAC5C,IAAI,QAAiB,CAAC;AAEtB,MAAM,WAAW,GAAyB;IACxC,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;KACnC;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,GAAS,EAAE;IACjC,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IACjC,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IACjC,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,GAA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IAClB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,aAAa;IAC5B,QAAQ,EAAE,QAAQ;IAClB,eAAe,EAAE,eAAe;IAChC,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,UAAU;IAEnB,QAAQ,EAAE,QAAQ;IAElB,SAAS,EAAE;QACT,GAAG,EAAE,SAAS,CAAC,GAAG;QAClB,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,eAAe,EAAE,SAAS,CAAC,eAAe;KAC3C;CACF,CAAC;AACF,iBAAS,UAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { PaymentContext, SdkCallback } from "../model";
2
+ import { GetInstallmentRequest } from "../model/domain/installments";
3
+ declare const getInstallmentsInfo: (merchantId: string, postData: GetInstallmentRequest, paymentContext: PaymentContext | null, cb: SdkCallback) => void;
4
+ export = getInstallmentsInfo;
@@ -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
+ const jsonschema_1 = require("jsonschema");
7
+ const communicator = require("../utils/communicator");
8
+ const sdkcontext = require("../utils/context");
9
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
10
+ const requestSchema = require("../../schemas/installments/GetInstallmentRequest.json");
11
+ const getInstallmentsInfo = function (merchantId, postData, paymentContext, cb) {
12
+ // validate postData
13
+ const isValidRequest = jsonschema_1.validate(postData, requestSchema);
14
+ if (!isValidRequest.valid) {
15
+ const logger = sdkcontext.getLogger();
16
+ if (sdkcontext.isLoggingEnabled()) {
17
+ logger("error", isValidRequest.errors);
18
+ }
19
+ throw new Error(isValidRequest.errors.toString());
20
+ }
21
+ communicator.json({
22
+ method: "POST",
23
+ modulePath: "/v1/" + merchantId + "/installments/getInstallmentsInfo",
24
+ body: postData,
25
+ paymentContext: paymentContext,
26
+ cb: cb
27
+ });
28
+ };
29
+ module.exports = getInstallmentsInfo;
30
+ //# sourceMappingURL=getInstallmentsInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInstallmentsInfo.js","sourceRoot":"","sources":["../../src/installments/getInstallmentsInfo.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,2CAAsC;AACtC,sDAAuD;AACvD,+CAAgD;AAIhD,8DAA8D;AAC9D,MAAM,aAAa,GAAG,OAAO,CAAC,uDAAuD,CAAC,CAAC;AAEvF,MAAM,mBAAmB,GAAG,UAAS,UAAkB,EAAE,QAA+B,EAAE,cAAqC,EAAE,EAAe;IAC9I,oBAAoB;IACpB,MAAM,cAAc,GAAG,qBAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACzD,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE;QACzB,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,IAAI,UAAU,CAAC,gBAAgB,EAAE,EAAE;YACjC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;SACxC;QACD,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;KACnD;IACD,YAAY,CAAC,IAAI,CAAC;QAChB,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,mCAAmC;QACrE,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE,cAAc;QAC9B,EAAE,EAAE,EAAE;KACP,CAAC,CAAC;AACL,CAAC,CAAC;AACF,iBAAS,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { InstallmentsClient } from "../model/installments";
2
+ declare const installmentsClient: InstallmentsClient;
3
+ export = installmentsClient;
@@ -0,0 +1,11 @@
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
+ const getInstallmentsInfo = require("./getInstallmentsInfo");
7
+ const installmentsClient = {
8
+ getInstallmentsInfo: getInstallmentsInfo
9
+ };
10
+ module.exports = installmentsClient;
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installments/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,6DAA8D;AAG9D,MAAM,kBAAkB,GAAuB;IAC7C,mBAAmB,EAAE,mBAAmB;CACzC,CAAC;AACF,iBAAS,kBAAkB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AbstractPaymentMethodSpecificInput, KeyValuePair, PaymentProductFilter } from "../../definitions";
1
+ import { AbstractPaymentMethodSpecificInput, AmountOfMoney, KeyValuePair, PaymentProductFilter } from "../../definitions";
2
2
  import { GPayThreeDSecure, Payment, PaymentCreationReferences } from "../../payment/definitions";
3
3
  export interface CreatedPaymentOutput {
4
4
  displayedData?: DisplayedData | null;
@@ -17,10 +17,15 @@ export interface DisplayedData {
17
17
  renderingData?: string | null;
18
18
  showData?: KeyValuePair[] | null;
19
19
  }
20
+ export interface Frequency {
21
+ interval?: string | null;
22
+ intervalFrequency?: number | null;
23
+ }
20
24
  export interface HostedCheckoutSpecificInput {
21
25
  isRecurring?: boolean | null;
22
26
  locale?: string | null;
23
27
  paymentProductFilters?: PaymentProductFiltersHostedCheckout | null;
28
+ recurringPaymentsData?: RecurringPaymentsData | null;
24
29
  returnCancelState?: boolean | null;
25
30
  returnUrl?: string | null;
26
31
  showResultPage?: boolean | null;
@@ -49,3 +54,18 @@ export interface PaymentProductFiltersHostedCheckout {
49
54
  restrictTo?: PaymentProductFilter | null;
50
55
  tokensOnly?: boolean | null;
51
56
  }
57
+ export interface RecurringPaymentsData {
58
+ recurringInterval?: Frequency | null;
59
+ trialInformation?: TrialInformation | null;
60
+ }
61
+ export interface TrialInformation {
62
+ amountOfMoneyAfterTrial?: AmountOfMoney | null;
63
+ endDate?: string | null;
64
+ isRecurring?: boolean | null;
65
+ trialPeriod?: TrialPeriod | null;
66
+ trialPeriodRecurring?: Frequency | null;
67
+ }
68
+ export interface TrialPeriod {
69
+ duration?: number | null;
70
+ interval?: string | null;
71
+ }
@@ -0,0 +1,11 @@
1
+ import { Installments } from "../../payment/definitions";
2
+ export interface InstallmentDisplayHints {
3
+ displayOrder?: number | null;
4
+ label?: string | null;
5
+ logo?: string | null;
6
+ }
7
+ export interface InstallmentOptions {
8
+ displayHints?: InstallmentDisplayHints | null;
9
+ id?: string | null;
10
+ installmentPlans?: Installments[] | null;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/model/domain/installments/definitions/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { AmountOfMoney } from "../definitions";
2
+ import { InstallmentOptions } from "./definitions";
3
+ export interface GetInstallmentRequest {
4
+ amountOfMoney?: AmountOfMoney | null;
5
+ bin?: string | null;
6
+ countryCode?: string | null;
7
+ paymentProductId?: number | null;
8
+ }
9
+ export interface InstallmentOptionsResponse {
10
+ installmentOptions?: InstallmentOptions[] | null;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/model/domain/installments/index.ts"],"names":[],"mappings":""}
@@ -68,13 +68,25 @@ export interface AbstractThreeDSecure {
68
68
  skipAuthentication?: boolean | null;
69
69
  transactionRiskLevel?: string | null;
70
70
  }
71
+ export interface AccountFundingRecipient {
72
+ accountNumber?: string | null;
73
+ accountNumberType?: string | null;
74
+ address?: Address | null;
75
+ dateOfBirth?: string | null;
76
+ name?: AfrName | null;
77
+ partialPan?: string | null;
78
+ }
71
79
  export interface AdditionalOrderInput {
80
+ accountFundingRecipient?: AccountFundingRecipient | null;
72
81
  airlineData?: AirlineData | null;
73
82
  installments?: Installments | null;
74
83
  /**
75
84
  * @deprecated Use Order.shoppingCart.amountBreakdown instead
76
85
  */
77
86
  level3SummaryData?: Level3SummaryData | null;
87
+ /**
88
+ * @deprecated No replacement
89
+ */
78
90
  loanRecipient?: LoanRecipient | null;
79
91
  lodgingData?: LodgingData | null;
80
92
  /**
@@ -87,6 +99,10 @@ export interface AdditionalOrderInput {
87
99
  export interface AddressPersonal extends Address {
88
100
  name?: PersonalName | null;
89
101
  }
102
+ export interface AfrName {
103
+ firstName?: string | null;
104
+ surname?: string | null;
105
+ }
90
106
  export interface AmountBreakdown {
91
107
  amount?: number | null;
92
108
  type?: string | null;
@@ -223,6 +239,7 @@ export interface Customer extends CustomerBase {
223
239
  contactDetails?: ContactDetails | null;
224
240
  device?: CustomerDevice | null;
225
241
  fiscalNumber?: string | null;
242
+ isCompany?: boolean | null;
226
243
  isPreviousCustomer?: boolean | null;
227
244
  locale?: string | null;
228
245
  personalInformation?: PersonalInformation | null;
@@ -343,6 +360,7 @@ export interface HostedCheckoutSpecificOutput {
343
360
  }
344
361
  export interface Installments {
345
362
  amountOfMoneyPerInstallment?: AmountOfMoney | null;
363
+ amountOfMoneyTotal?: AmountOfMoney | null;
346
364
  frequencyOfInstallments?: string | null;
347
365
  installmentPlanCode?: number | null;
348
366
  interestRate?: string | null;
@@ -397,11 +415,29 @@ export interface LineItemLevel3InterchangeInformation {
397
415
  taxAmount?: number | null;
398
416
  unit?: string | null;
399
417
  }
418
+ /**
419
+ * @deprecated No replacement
420
+ */
400
421
  export interface LoanRecipient {
422
+ /**
423
+ * @deprecated No replacement
424
+ */
401
425
  accountNumber?: string | null;
426
+ /**
427
+ * @deprecated No replacement
428
+ */
402
429
  dateOfBirth?: string | null;
430
+ /**
431
+ * @deprecated No replacement
432
+ */
403
433
  partialPan?: string | null;
434
+ /**
435
+ * @deprecated No replacement
436
+ */
404
437
  surname?: string | null;
438
+ /**
439
+ * @deprecated No replacement
440
+ */
405
441
  zip?: string | null;
406
442
  }
407
443
  export interface Merchant {
@@ -528,6 +564,7 @@ export interface OrderReferencesApprovePayment {
528
564
  merchantReference?: string | null;
529
565
  }
530
566
  export interface OrderTypeInformation {
567
+ fundingType?: string | null;
531
568
  purchaseType?: string | null;
532
569
  transactionType?: string | null;
533
570
  usageType?: string | null;
@@ -621,9 +658,15 @@ export interface PaymentStatusOutput extends OrderStatusOutput {
621
658
  isRefundable?: boolean | null;
622
659
  threeDSecureStatus?: string | null;
623
660
  }
661
+ export interface PersonalIdentification {
662
+ idIssuingCountryCode?: string | null;
663
+ idType?: string | null;
664
+ idValue?: string | null;
665
+ }
624
666
  export interface PersonalInformation {
625
667
  dateOfBirth?: string | null;
626
668
  gender?: string | null;
669
+ identification?: PersonalIdentification | null;
627
670
  name?: PersonalName | null;
628
671
  }
629
672
  export interface PersonalName extends PersonalNameBase {
@@ -13,6 +13,7 @@ import { ServicesClient } from "./services";
13
13
  import { TokensClient } from "./tokens";
14
14
  import { MandatesClient } from "./mandates";
15
15
  import { SessionsClient } from "./sessions";
16
+ import { InstallmentsClient } from "./installments";
16
17
  import { FilesClient } from "./files";
17
18
  import { WebhooksHelper } from "./webhooks";
18
19
  export interface ConnectSdk {
@@ -31,6 +32,7 @@ export interface ConnectSdk {
31
32
  readonly tokens: TokensClient;
32
33
  readonly mandates: MandatesClient;
33
34
  readonly sessions: SessionsClient;
35
+ readonly installments: InstallmentsClient;
34
36
  readonly files: FilesClient;
35
37
  readonly context: SdkContext;
36
38
  readonly webhooks: WebhooksHelper;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgDA,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAkDA,0CAAwB"}
@@ -0,0 +1,11 @@
1
+ import { GetInstallmentRequest } from "../domain/installments";
2
+ import { PaymentContext, SdkCallback } from "../types";
3
+ export interface InstallmentsClient {
4
+ /**
5
+ * Resource /{merchantId}/installments/getInstallmentsInfo - <a href="https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/nodejs/installments/getInstallmentsInfo.html">Get Installment Info</a>
6
+ * @param cb The callback for the response.
7
+ * If the call was successfull, the response body type will be {@link InstallmentOptionsResponse}.
8
+ * If the call was not successful, the response body type will be {@link ErrorResponse}.
9
+ */
10
+ getInstallmentsInfo(merchantId: string, postData: GetInstallmentRequest, paymentContext: PaymentContext | null, cb: SdkCallback): void;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/model/installments/index.ts"],"names":[],"mappings":""}
@@ -9,7 +9,7 @@ exports.date = date;
9
9
  function serverMetaInfo(sdkContext) {
10
10
  const info = {
11
11
  sdkCreator: "Ingenico",
12
- sdkIdentifier: "NodejsServerSDK/v4.14.0",
12
+ sdkIdentifier: "NodejsServerSDK/v4.16.0",
13
13
  platformIdentifier: process.env["OS"] + " Node.js/" + process.versions.node
14
14
  };
15
15
  if (sdkContext.getIntegrator() !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connect-sdk-nodejs",
3
- "version": "4.14.0",
3
+ "version": "4.16.0",
4
4
  "description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",
5
5
  "homepage": "https://github.com/Ingenico-ePayments/connect-sdk-nodejs#readme",
6
6
  "bugs": {
@@ -38,9 +38,36 @@
38
38
  },
39
39
  "additionalProperties" : false,
40
40
  "definitions" : {
41
+ "AccountFundingRecipient" : {
42
+ "type" : "object",
43
+ "properties" : {
44
+ "accountNumber" : {
45
+ "type" : "string"
46
+ },
47
+ "accountNumberType" : {
48
+ "type" : "string"
49
+ },
50
+ "address" : {
51
+ "$ref" : "#/definitions/Address"
52
+ },
53
+ "dateOfBirth" : {
54
+ "type" : "string"
55
+ },
56
+ "name" : {
57
+ "$ref" : "#/definitions/AfrName"
58
+ },
59
+ "partialPan" : {
60
+ "type" : "string"
61
+ }
62
+ },
63
+ "additionalProperties" : false
64
+ },
41
65
  "AdditionalOrderInput" : {
42
66
  "type" : "object",
43
67
  "properties" : {
68
+ "accountFundingRecipient" : {
69
+ "$ref" : "#/definitions/AccountFundingRecipient"
70
+ },
44
71
  "airlineData" : {
45
72
  "$ref" : "#/definitions/AirlineData"
46
73
  },
@@ -132,6 +159,18 @@
132
159
  },
133
160
  "additionalProperties" : false
134
161
  },
162
+ "AfrName" : {
163
+ "type" : "object",
164
+ "properties" : {
165
+ "firstName" : {
166
+ "type" : "string"
167
+ },
168
+ "surname" : {
169
+ "type" : "string"
170
+ }
171
+ },
172
+ "additionalProperties" : false
173
+ },
135
174
  "AirlineData" : {
136
175
  "type" : "object",
137
176
  "properties" : {
@@ -561,6 +600,9 @@
561
600
  "fiscalNumber" : {
562
601
  "type" : "string"
563
602
  },
603
+ "isCompany" : {
604
+ "type" : "boolean"
605
+ },
564
606
  "isPreviousCustomer" : {
565
607
  "type" : "boolean"
566
608
  },
@@ -802,6 +844,19 @@
802
844
  },
803
845
  "additionalProperties" : false
804
846
  },
847
+ "Frequency" : {
848
+ "type" : "object",
849
+ "properties" : {
850
+ "interval" : {
851
+ "type" : "string"
852
+ },
853
+ "intervalFrequency" : {
854
+ "type" : "integer",
855
+ "maximum" : 2147483647
856
+ }
857
+ },
858
+ "additionalProperties" : false
859
+ },
805
860
  "GPayThreeDSecure" : {
806
861
  "type" : "object",
807
862
  "properties" : {
@@ -848,6 +903,9 @@
848
903
  "paymentProductFilters" : {
849
904
  "$ref" : "#/definitions/PaymentProductFiltersHostedCheckout"
850
905
  },
906
+ "recurringPaymentsData" : {
907
+ "$ref" : "#/definitions/RecurringPaymentsData"
908
+ },
851
909
  "returnCancelState" : {
852
910
  "type" : "boolean"
853
911
  },
@@ -875,6 +933,9 @@
875
933
  "amountOfMoneyPerInstallment" : {
876
934
  "$ref" : "#/definitions/AmountOfMoney"
877
935
  },
936
+ "amountOfMoneyTotal" : {
937
+ "$ref" : "#/definitions/AmountOfMoney"
938
+ },
878
939
  "frequencyOfInstallments" : {
879
940
  "type" : "string"
880
941
  },
@@ -1402,6 +1463,9 @@
1402
1463
  "OrderTypeInformation" : {
1403
1464
  "type" : "object",
1404
1465
  "properties" : {
1466
+ "fundingType" : {
1467
+ "type" : "string"
1468
+ },
1405
1469
  "purchaseType" : {
1406
1470
  "type" : "string"
1407
1471
  },
@@ -1465,6 +1529,21 @@
1465
1529
  },
1466
1530
  "additionalProperties" : false
1467
1531
  },
1532
+ "PersonalIdentification" : {
1533
+ "type" : "object",
1534
+ "properties" : {
1535
+ "idIssuingCountryCode" : {
1536
+ "type" : "string"
1537
+ },
1538
+ "idType" : {
1539
+ "type" : "string"
1540
+ },
1541
+ "idValue" : {
1542
+ "type" : "string"
1543
+ }
1544
+ },
1545
+ "additionalProperties" : false
1546
+ },
1468
1547
  "PersonalInformation" : {
1469
1548
  "type" : "object",
1470
1549
  "properties" : {
@@ -1474,6 +1553,9 @@
1474
1553
  "gender" : {
1475
1554
  "type" : "string"
1476
1555
  },
1556
+ "identification" : {
1557
+ "$ref" : "#/definitions/PersonalIdentification"
1558
+ },
1477
1559
  "name" : {
1478
1560
  "$ref" : "#/definitions/PersonalName"
1479
1561
  }
@@ -1498,6 +1580,18 @@
1498
1580
  },
1499
1581
  "additionalProperties" : false
1500
1582
  },
1583
+ "RecurringPaymentsData" : {
1584
+ "type" : "object",
1585
+ "properties" : {
1586
+ "recurringInterval" : {
1587
+ "$ref" : "#/definitions/Frequency"
1588
+ },
1589
+ "trialInformation" : {
1590
+ "$ref" : "#/definitions/TrialInformation"
1591
+ }
1592
+ },
1593
+ "additionalProperties" : false
1594
+ },
1501
1595
  "RedirectPaymentMethodSpecificInputBase" : {
1502
1596
  "type" : "object",
1503
1597
  "properties" : {
@@ -1771,6 +1865,40 @@
1771
1865
  }
1772
1866
  },
1773
1867
  "additionalProperties" : false
1868
+ },
1869
+ "TrialInformation" : {
1870
+ "type" : "object",
1871
+ "properties" : {
1872
+ "amountOfMoneyAfterTrial" : {
1873
+ "$ref" : "#/definitions/AmountOfMoney"
1874
+ },
1875
+ "endDate" : {
1876
+ "type" : "string"
1877
+ },
1878
+ "isRecurring" : {
1879
+ "type" : "boolean"
1880
+ },
1881
+ "trialPeriod" : {
1882
+ "$ref" : "#/definitions/TrialPeriod"
1883
+ },
1884
+ "trialPeriodRecurring" : {
1885
+ "$ref" : "#/definitions/Frequency"
1886
+ }
1887
+ },
1888
+ "additionalProperties" : false
1889
+ },
1890
+ "TrialPeriod" : {
1891
+ "type" : "object",
1892
+ "properties" : {
1893
+ "duration" : {
1894
+ "type" : "integer",
1895
+ "maximum" : 2147483647
1896
+ },
1897
+ "interval" : {
1898
+ "type" : "string"
1899
+ }
1900
+ },
1901
+ "additionalProperties" : false
1774
1902
  }
1775
1903
  }
1776
1904
  }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema" : "http://json-schema.org/draft-04/schema#",
3
+ "type" : "object",
4
+ "properties" : {
5
+ "amountOfMoney" : {
6
+ "$ref" : "#/definitions/AmountOfMoney"
7
+ },
8
+ "bin" : {
9
+ "type" : "string"
10
+ },
11
+ "countryCode" : {
12
+ "type" : "string"
13
+ },
14
+ "paymentProductId" : {
15
+ "type" : "integer",
16
+ "maximum" : 2147483647
17
+ }
18
+ },
19
+ "additionalProperties" : false,
20
+ "definitions" : {
21
+ "AmountOfMoney" : {
22
+ "type" : "object",
23
+ "properties" : {
24
+ "amount" : {
25
+ "type" : "integer",
26
+ "maximum" : 9223372036854775807
27
+ },
28
+ "currencyCode" : {
29
+ "type" : "string"
30
+ }
31
+ },
32
+ "additionalProperties" : false
33
+ }
34
+ }
35
+ }
@@ -14,9 +14,36 @@
14
14
  },
15
15
  "additionalProperties" : false,
16
16
  "definitions" : {
17
+ "AccountFundingRecipient" : {
18
+ "type" : "object",
19
+ "properties" : {
20
+ "accountNumber" : {
21
+ "type" : "string"
22
+ },
23
+ "accountNumberType" : {
24
+ "type" : "string"
25
+ },
26
+ "address" : {
27
+ "$ref" : "#/definitions/Address"
28
+ },
29
+ "dateOfBirth" : {
30
+ "type" : "string"
31
+ },
32
+ "name" : {
33
+ "$ref" : "#/definitions/AfrName"
34
+ },
35
+ "partialPan" : {
36
+ "type" : "string"
37
+ }
38
+ },
39
+ "additionalProperties" : false
40
+ },
17
41
  "AdditionalOrderInput" : {
18
42
  "type" : "object",
19
43
  "properties" : {
44
+ "accountFundingRecipient" : {
45
+ "$ref" : "#/definitions/AccountFundingRecipient"
46
+ },
20
47
  "airlineData" : {
21
48
  "$ref" : "#/definitions/AirlineData"
22
49
  },
@@ -108,6 +135,18 @@
108
135
  },
109
136
  "additionalProperties" : false
110
137
  },
138
+ "AfrName" : {
139
+ "type" : "object",
140
+ "properties" : {
141
+ "firstName" : {
142
+ "type" : "string"
143
+ },
144
+ "surname" : {
145
+ "type" : "string"
146
+ }
147
+ },
148
+ "additionalProperties" : false
149
+ },
111
150
  "AirlineData" : {
112
151
  "type" : "object",
113
152
  "properties" : {
@@ -431,6 +470,9 @@
431
470
  "fiscalNumber" : {
432
471
  "type" : "string"
433
472
  },
473
+ "isCompany" : {
474
+ "type" : "boolean"
475
+ },
434
476
  "isPreviousCustomer" : {
435
477
  "type" : "boolean"
436
478
  },
@@ -576,6 +618,9 @@
576
618
  "amountOfMoneyPerInstallment" : {
577
619
  "$ref" : "#/definitions/AmountOfMoney"
578
620
  },
621
+ "amountOfMoneyTotal" : {
622
+ "$ref" : "#/definitions/AmountOfMoney"
623
+ },
579
624
  "frequencyOfInstallments" : {
580
625
  "type" : "string"
581
626
  },
@@ -976,6 +1021,9 @@
976
1021
  "OrderTypeInformation" : {
977
1022
  "type" : "object",
978
1023
  "properties" : {
1024
+ "fundingType" : {
1025
+ "type" : "string"
1026
+ },
979
1027
  "purchaseType" : {
980
1028
  "type" : "string"
981
1029
  },
@@ -1001,6 +1049,21 @@
1001
1049
  },
1002
1050
  "additionalProperties" : false
1003
1051
  },
1052
+ "PersonalIdentification" : {
1053
+ "type" : "object",
1054
+ "properties" : {
1055
+ "idIssuingCountryCode" : {
1056
+ "type" : "string"
1057
+ },
1058
+ "idType" : {
1059
+ "type" : "string"
1060
+ },
1061
+ "idValue" : {
1062
+ "type" : "string"
1063
+ }
1064
+ },
1065
+ "additionalProperties" : false
1066
+ },
1004
1067
  "PersonalInformation" : {
1005
1068
  "type" : "object",
1006
1069
  "properties" : {
@@ -1010,6 +1073,9 @@
1010
1073
  "gender" : {
1011
1074
  "type" : "string"
1012
1075
  },
1076
+ "identification" : {
1077
+ "$ref" : "#/definitions/PersonalIdentification"
1078
+ },
1013
1079
  "name" : {
1014
1080
  "$ref" : "#/definitions/PersonalName"
1015
1081
  }
@@ -44,9 +44,36 @@
44
44
  },
45
45
  "additionalProperties" : false,
46
46
  "definitions" : {
47
+ "AccountFundingRecipient" : {
48
+ "type" : "object",
49
+ "properties" : {
50
+ "accountNumber" : {
51
+ "type" : "string"
52
+ },
53
+ "accountNumberType" : {
54
+ "type" : "string"
55
+ },
56
+ "address" : {
57
+ "$ref" : "#/definitions/Address"
58
+ },
59
+ "dateOfBirth" : {
60
+ "type" : "string"
61
+ },
62
+ "name" : {
63
+ "$ref" : "#/definitions/AfrName"
64
+ },
65
+ "partialPan" : {
66
+ "type" : "string"
67
+ }
68
+ },
69
+ "additionalProperties" : false
70
+ },
47
71
  "AdditionalOrderInput" : {
48
72
  "type" : "object",
49
73
  "properties" : {
74
+ "accountFundingRecipient" : {
75
+ "$ref" : "#/definitions/AccountFundingRecipient"
76
+ },
50
77
  "airlineData" : {
51
78
  "$ref" : "#/definitions/AirlineData"
52
79
  },
@@ -138,6 +165,18 @@
138
165
  },
139
166
  "additionalProperties" : false
140
167
  },
168
+ "AfrName" : {
169
+ "type" : "object",
170
+ "properties" : {
171
+ "firstName" : {
172
+ "type" : "string"
173
+ },
174
+ "surname" : {
175
+ "type" : "string"
176
+ }
177
+ },
178
+ "additionalProperties" : false
179
+ },
141
180
  "AirlineData" : {
142
181
  "type" : "object",
143
182
  "properties" : {
@@ -723,6 +762,9 @@
723
762
  "fiscalNumber" : {
724
763
  "type" : "string"
725
764
  },
765
+ "isCompany" : {
766
+ "type" : "boolean"
767
+ },
726
768
  "isPreviousCustomer" : {
727
769
  "type" : "boolean"
728
770
  },
@@ -1094,6 +1136,9 @@
1094
1136
  "amountOfMoneyPerInstallment" : {
1095
1137
  "$ref" : "#/definitions/AmountOfMoney"
1096
1138
  },
1139
+ "amountOfMoneyTotal" : {
1140
+ "$ref" : "#/definitions/AmountOfMoney"
1141
+ },
1097
1142
  "frequencyOfInstallments" : {
1098
1143
  "type" : "string"
1099
1144
  },
@@ -1686,6 +1731,9 @@
1686
1731
  "OrderTypeInformation" : {
1687
1732
  "type" : "object",
1688
1733
  "properties" : {
1734
+ "fundingType" : {
1735
+ "type" : "string"
1736
+ },
1689
1737
  "purchaseType" : {
1690
1738
  "type" : "string"
1691
1739
  },
@@ -1711,6 +1759,21 @@
1711
1759
  },
1712
1760
  "additionalProperties" : false
1713
1761
  },
1762
+ "PersonalIdentification" : {
1763
+ "type" : "object",
1764
+ "properties" : {
1765
+ "idIssuingCountryCode" : {
1766
+ "type" : "string"
1767
+ },
1768
+ "idType" : {
1769
+ "type" : "string"
1770
+ },
1771
+ "idValue" : {
1772
+ "type" : "string"
1773
+ }
1774
+ },
1775
+ "additionalProperties" : false
1776
+ },
1714
1777
  "PersonalInformation" : {
1715
1778
  "type" : "object",
1716
1779
  "properties" : {
@@ -1720,6 +1783,9 @@
1720
1783
  "gender" : {
1721
1784
  "type" : "string"
1722
1785
  },
1786
+ "identification" : {
1787
+ "$ref" : "#/definitions/PersonalIdentification"
1788
+ },
1723
1789
  "name" : {
1724
1790
  "$ref" : "#/definitions/PersonalName"
1725
1791
  }