@finverse/sdk-typescript 0.0.3 → 0.0.4

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/dist/api.d.ts CHANGED
@@ -381,6 +381,19 @@ export interface CreateCustomerResponse {
381
381
  */
382
382
  webhook_uris?: Array<string>;
383
383
  }
384
+ /**
385
+ *
386
+ * @export
387
+ * @interface CreatePaymentInstructionResponse
388
+ */
389
+ export interface CreatePaymentInstructionResponse {
390
+ /**
391
+ *
392
+ * @type {string}
393
+ * @memberof CreatePaymentInstructionResponse
394
+ */
395
+ payment_instruction_id?: string;
396
+ }
384
397
  /**
385
398
  *
386
399
  * @export
@@ -1774,6 +1787,73 @@ export interface PaymentDetails {
1774
1787
  */
1775
1788
  other_info?: OtherInfo;
1776
1789
  }
1790
+ /**
1791
+ *
1792
+ * @export
1793
+ * @interface PaymentInstruction
1794
+ */
1795
+ export interface PaymentInstruction {
1796
+ /**
1797
+ * The recipient name
1798
+ * @type {string}
1799
+ * @memberof PaymentInstruction
1800
+ */
1801
+ recipient_name?: string;
1802
+ /**
1803
+ * The sender name
1804
+ * @type {string}
1805
+ * @memberof PaymentInstruction
1806
+ */
1807
+ sender_name?: string;
1808
+ /**
1809
+ * The sender account Id
1810
+ * @type {string}
1811
+ * @memberof PaymentInstruction
1812
+ */
1813
+ sender_account_id?: string;
1814
+ /**
1815
+ * When the payment should start
1816
+ * @type {string}
1817
+ * @memberof PaymentInstruction
1818
+ */
1819
+ start_date?: string | null;
1820
+ /**
1821
+ * When the payment should stop
1822
+ * @type {string}
1823
+ * @memberof PaymentInstruction
1824
+ */
1825
+ end_date?: string | null;
1826
+ /**
1827
+ * The currency for the payment
1828
+ * @type {string}
1829
+ * @memberof PaymentInstruction
1830
+ */
1831
+ currency?: string;
1832
+ /**
1833
+ * The payment amount
1834
+ * @type {number}
1835
+ * @memberof PaymentInstruction
1836
+ */
1837
+ amount?: number;
1838
+ /**
1839
+ * How often the payment is executed
1840
+ * @type {string}
1841
+ * @memberof PaymentInstruction
1842
+ */
1843
+ frequency?: string;
1844
+ /**
1845
+ * Related remarks
1846
+ * @type {string}
1847
+ * @memberof PaymentInstruction
1848
+ */
1849
+ remarks?: string;
1850
+ /**
1851
+ * A customer provided key to ensure ideompotency
1852
+ * @type {string}
1853
+ * @memberof PaymentInstruction
1854
+ */
1855
+ idempotence_key?: string;
1856
+ }
1777
1857
  /**
1778
1858
  *
1779
1859
  * @export
@@ -2125,6 +2205,13 @@ export interface Transaction {
2125
2205
  * @export
2126
2206
  */
2127
2207
  export declare const CustomerApiAxiosParamCreator: (configuration?: Configuration) => {
2208
+ /**
2209
+ * Create a new payment instruction to be used when linking to perform debit authorization
2210
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2211
+ * @param {*} [options] Override http request option.
2212
+ * @throws {RequiredError}
2213
+ */
2214
+ createPaymentInstruction: (paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2128
2215
  /**
2129
2216
  * generate a link token that can be used to create link
2130
2217
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2176,6 +2263,13 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
2176
2263
  * @export
2177
2264
  */
2178
2265
  export declare const CustomerApiFp: (configuration?: Configuration) => {
2266
+ /**
2267
+ * Create a new payment instruction to be used when linking to perform debit authorization
2268
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2269
+ * @param {*} [options] Override http request option.
2270
+ * @throws {RequiredError}
2271
+ */
2272
+ createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentInstructionResponse>>;
2179
2273
  /**
2180
2274
  * generate a link token that can be used to create link
2181
2275
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2227,6 +2321,13 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
2227
2321
  * @export
2228
2322
  */
2229
2323
  export declare const CustomerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
2324
+ /**
2325
+ * Create a new payment instruction to be used when linking to perform debit authorization
2326
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2327
+ * @param {*} [options] Override http request option.
2328
+ * @throws {RequiredError}
2329
+ */
2330
+ createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: any): AxiosPromise<CreatePaymentInstructionResponse>;
2230
2331
  /**
2231
2332
  * generate a link token that can be used to create link
2232
2333
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2279,6 +2380,14 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
2279
2380
  * @interface CustomerApi
2280
2381
  */
2281
2382
  export interface CustomerApiInterface {
2383
+ /**
2384
+ * Create a new payment instruction to be used when linking to perform debit authorization
2385
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2386
+ * @param {*} [options] Override http request option.
2387
+ * @throws {RequiredError}
2388
+ * @memberof CustomerApiInterface
2389
+ */
2390
+ createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentInstructionResponse>;
2282
2391
  /**
2283
2392
  * generate a link token that can be used to create link
2284
2393
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -2338,6 +2447,14 @@ export interface CustomerApiInterface {
2338
2447
  * @extends {BaseAPI}
2339
2448
  */
2340
2449
  export declare class CustomerApi extends BaseAPI implements CustomerApiInterface {
2450
+ /**
2451
+ * Create a new payment instruction to be used when linking to perform debit authorization
2452
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
2453
+ * @param {*} [options] Override http request option.
2454
+ * @throws {RequiredError}
2455
+ * @memberof CustomerApi
2456
+ */
2457
+ createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentInstructionResponse>>;
2341
2458
  /**
2342
2459
  * generate a link token that can be used to create link
2343
2460
  * @param {LinkTokenRequest} linkTokenRequest token request
package/dist/api.js CHANGED
@@ -40,6 +40,38 @@ exports.LinkTokenRequestUiModeEnum = {
40
40
  */
41
41
  exports.CustomerApiAxiosParamCreator = function (configuration) {
42
42
  return {
43
+ /**
44
+ * Create a new payment instruction to be used when linking to perform debit authorization
45
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ createPaymentInstruction: (paymentInstruction, options = {}) => __awaiter(this, void 0, void 0, function* () {
50
+ // verify required parameter 'paymentInstruction' is not null or undefined
51
+ common_1.assertParamExists('createPaymentInstruction', 'paymentInstruction', paymentInstruction);
52
+ const localVarPath = `/payments/instruction`;
53
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
55
+ let baseOptions;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ }
59
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
60
+ const localVarHeaderParameter = {};
61
+ const localVarQueryParameter = {};
62
+ // authentication Oauth2 required
63
+ // oauth required
64
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
65
+ localVarHeaderParameter['Content-Type'] = 'application/json';
66
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
67
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
68
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
69
+ localVarRequestOptions.data = common_1.serializeDataIfNeeded(paymentInstruction, localVarRequestOptions, configuration);
70
+ return {
71
+ url: common_1.toPathString(localVarUrlObj),
72
+ options: localVarRequestOptions,
73
+ };
74
+ }),
43
75
  /**
44
76
  * generate a link token that can be used to create link
45
77
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -246,6 +278,18 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
246
278
  exports.CustomerApiFp = function (configuration) {
247
279
  const localVarAxiosParamCreator = exports.CustomerApiAxiosParamCreator(configuration);
248
280
  return {
281
+ /**
282
+ * Create a new payment instruction to be used when linking to perform debit authorization
283
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ */
287
+ createPaymentInstruction(paymentInstruction, options) {
288
+ return __awaiter(this, void 0, void 0, function* () {
289
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPaymentInstruction(paymentInstruction, options);
290
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
291
+ });
292
+ },
249
293
  /**
250
294
  * generate a link token that can be used to create link
251
295
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -330,6 +374,17 @@ exports.CustomerApiFp = function (configuration) {
330
374
  exports.CustomerApiFactory = function (configuration, basePath, axios) {
331
375
  const localVarFp = exports.CustomerApiFp(configuration);
332
376
  return {
377
+ /**
378
+ * Create a new payment instruction to be used when linking to perform debit authorization
379
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ createPaymentInstruction(paymentInstruction, options) {
384
+ return localVarFp
385
+ .createPaymentInstruction(paymentInstruction, options)
386
+ .then((request) => request(axios, basePath));
387
+ },
333
388
  /**
334
389
  * generate a link token that can be used to create link
335
390
  * @param {LinkTokenRequest} linkTokenRequest token request
@@ -398,6 +453,18 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
398
453
  * @extends {BaseAPI}
399
454
  */
400
455
  class CustomerApi extends base_1.BaseAPI {
456
+ /**
457
+ * Create a new payment instruction to be used when linking to perform debit authorization
458
+ * @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ * @memberof CustomerApi
462
+ */
463
+ createPaymentInstruction(paymentInstruction, options) {
464
+ return exports.CustomerApiFp(this.configuration)
465
+ .createPaymentInstruction(paymentInstruction, options)
466
+ .then((request) => request(this.axios, this.basePath));
467
+ }
401
468
  /**
402
469
  * generate a link token that can be used to create link
403
470
  * @param {LinkTokenRequest} linkTokenRequest token request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finverse/sdk-typescript",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "OpenAPI client for @finverse/sdk-typescript",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -26,7 +26,7 @@
26
26
  "@types/node": "^12.11.5",
27
27
  "axios-mock-adapter": "^1.20.0",
28
28
  "chai": "^4.3.6",
29
- "mocha": "^9.2.1",
29
+ "mocha": "^9.2.2",
30
30
  "ts-node": "^10.7.0",
31
31
  "typescript": "^3.6.4"
32
32
  },